View as Markdown

API reference: @salmonui/editors/image-editor

ImageEditorImageAnnotationinterface

import type { ImageEditorImageAnnotation } from '@salmonui/editors/image-editor';
interface ImageEditorImageAnnotation extends AnnotationCommon {
    readonly kind: 'image';
    readonly x: number;
    readonly y: number;
    readonly width: number;
    readonly height: number;
    readonly src: string;
}

Image annotation.

ImageEditorImageAnnotation members (9, 3 inherited)
NameSignatureDescription
kindreadonly kind: 'image';
xreadonly x: number;
yreadonly y: number;
widthreadonly width: number;
heightreadonly height: number;
srcreadonly src: string;

URL or data URL.

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.