View as Markdown

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;
}
ImageEditorBoxAnnotation members (12, 6 inherited)
NameSignatureDescription
kindreadonly kind: 'rectangle' | 'ellipse';
xreadonly x: number;
yreadonly y: number;
widthreadonly width: number;
heightreadonly height: number;
radiusoptionalreadonly radius?: number | undefined;

Corner radius of a rectangle.

idinheritedid: string;

Stable id; selection, history and callbacks use it.

rotationoptionalinheritedrotation?: number;

Clockwise degrees around the annotation's center. Default 0.

opacityoptionalinheritedopacity?: number;

0 to 1. Default 1.

strokeoptionalinheritedstroke?: string;

CSS color; 'transparent' or omitted draws no stroke for filled shapes. Default '#e5484d'.

filloptionalinheritedfill?: string;

CSS color; omitted draws no fill.

strokeWidthoptionalinheritedstrokeWidth?: number;

Default 4.