[]
Image layer canvas.
name: string;
Image layer name.
readonly size: Size;
Image layer size.
readonly mainCanvas: HTMLCanvasElement;
Canvas object to paint.
readonly backCanvas: HTMLCanvasElement;
Canvas object to paint.
readonly mainCtx: CanvasRenderingContext2D;
Main 2D rendering context.
readonly backCtx: CanvasRenderingContext2D;
Background 2D rendering context.
readonly paintObjects: PaintObject<PaintObjectType>[];
The objects in this array are drawn to the canvas.
clear(clearCache): void;
Removes everything drawn before on image layer.
boolean
Indicates if should clear cache too.
void
dispose(): void;
Clears all resources and removes image layer.
void
ensureBackground(): Promise<void>;
Draws an original viewer image on image layer.
Promise<void>
merge(): Promise<void>;
Merges image layer into original viewer image.
Promise<void>
saveToDataURL(): Promise<string>;
Clears all resources and removes image layer.
Promise<string>
Promise with string that contains dataUrl
drawObjects(): Promise<void>;
Call this method to draw the paint objects specified in the paintObjects array onto the canvas.
Promise<void>
executeTempPaintCommand(cmd): void;
Run a temporary paint command on a separate temporary canvas layer. This method should create and display the temporary canvas layer if it doesn't exist.
void
getTempPaintCommands(): PaintCommand[];
Get all temporary paint commands.
clearTempPaintCommands(): void;
Clear all temporary paint commands, clear and dispose the temporary canvas layer.
void