[]
        
(Showing Draft Content)

IImageLayer

Document Solutions Image Viewer - v7.2.0 / IImageLayer

Interface: IImageLayer

Image layer canvas.

Table of contents

Accessors

Methods

Accessors

name

get name(): string

Image layer name.

Returns

string

set name(name): void

Image layer name.

Parameters

Name Type
name string

Returns

void


mainCanvas

get mainCanvas(): HTMLCanvasElement

Canvas object to paint.

Returns

HTMLCanvasElement


backCanvas

get backCanvas(): HTMLCanvasElement

Canvas object to paint.

Returns

HTMLCanvasElement


mainCtx

get mainCtx(): CanvasRenderingContext2D

Main 2D rendering context.

Returns

CanvasRenderingContext2D


backCtx

get backCtx(): CanvasRenderingContext2D

Background 2D rendering context.

Returns

CanvasRenderingContext2D


paintObjects

get paintObjects(): IPaintObject[]

The objects in this array are drawn to the canvas.

Returns

IPaintObject[]

Methods

drawObjects

drawObjects(): any

Call this method to draw the paint objects specified in the paintObjects array onto the canvas.

Returns

any


executeTempPaintCommand

executeTempPaintCommand(cmd): any

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.

Parameters

Name Type
cmd IPaintCommand

Returns

any


getTempPaintCommands

getTempPaintCommands(): IPaintCommand[]

Get all temporary paint commands.

Returns

IPaintCommand[]


clearTempPaintCommands

clearTempPaintCommands(): any

Clear all temporary paint commands, clear and dispose the temporary canvas layer.

Returns

any