API reference: @salmonui/editors/image-editor
ImageEditorBoxAnnotationinterface
import type { ImageEditorBoxAnnotation } from '@salmonui/editors/image-editor';interface ImageEditorBoxAnnotation extends AnnotationCommon, ImageEditorShapeStyle {
readonly kind: 'rectangle' | 'ellipse';
readonly x: number;
readonly y: number;
readonly width: number;
readonly height: number;
readonly radius?: number | undefined;
}
| Name | Signature | Description |
|---|---|---|
kind | readonly kind: 'rectangle' | 'ellipse'; | |
x | readonly x: number; | |
y | readonly y: number; | |
width | readonly width: number; | |
height | readonly height: number; | |
radiusoptional | readonly radius?: number | undefined; | Corner radius of a rectangle. |
idinherited | id: string; | Stable id; selection, history and callbacks use it. |
rotationoptionalinherited | rotation?: number; | Clockwise degrees around the annotation's center. Default 0. |
opacityoptionalinherited | opacity?: number; | 0 to 1. Default 1. |
strokeoptionalinherited | stroke?: string; | CSS color; |
filloptionalinherited | fill?: string; | CSS color; omitted draws no fill. |
strokeWidthoptionalinherited | strokeWidth?: number; | Default 4. |