API reference: @salmonui/editors/image-editor
ImageEditorPointsAnnotationinterface
import type { ImageEditorPointsAnnotation } from '@salmonui/editors/image-editor';interface ImageEditorPointsAnnotation extends AnnotationCommon, ImageEditorShapeStyle {
readonly kind: 'line' | 'arrow' | 'path' | 'freehand';
readonly points: readonly number[];
readonly closed?: boolean | undefined;
}
line and arrow use two points; path and freehand any number. Points are [x0, y0, x1, y1, ...].
| Name | Signature | Description |
|---|---|---|
kind | readonly kind: 'line' | 'arrow' | 'path' | 'freehand'; | |
points | readonly points: readonly number[]; | |
closedoptional | readonly closed?: boolean | undefined; |
|
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. |