Skip to main content

Interface: HorizonCanvasLayerCanvasInstance

Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:19

An instance of a canvas within a MapCanvasLayer.

Properties

canvas

readonly canvas: HTMLCanvasElement

Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:21

This instance's canvas element.


context

readonly context: CanvasRenderingContext2D

Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:24

This instance's canvas 2D rendering context.


isDisplayed

readonly isDisplayed: boolean

Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:27

Whether this instance's canvas is displayed.

Methods

clear()

clear(): void

Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:30

Clears this canvas.

Returns

void


reset()

reset(): void

Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:36

Resets this instance's canvas. This will erase the canvas of all drawn pixels, reset its state (including all styles, transformations, and cached paths), and clear the Coherent GT command buffer associated with it.

Returns

void