Class: HorizonCanvasLayerCanvasInstanceClass
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:42
An implementation of MapCanvasLayerCanvasInstance.
Implements
Constructors
Constructor
new HorizonCanvasLayerCanvasInstanceClass(
canvas
,context
,isDisplayed
):HorizonCanvasLayerCanvasInstanceClass
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:49
Creates a new canvas instance.
Parameters
Parameter | Type | Description |
---|---|---|
canvas | HTMLCanvasElement | The canvas element. |
context | CanvasRenderingContext2D | The canvas 2D rendering context. |
isDisplayed | boolean | Whether the canvas is displayed. |
Returns
HorizonCanvasLayerCanvasInstanceClass
Properties
canvas
readonly
canvas:HTMLCanvasElement
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:50
The canvas element.
Implementation of
HorizonCanvasLayerCanvasInstance
.canvas
context
readonly
context:CanvasRenderingContext2D
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:51
The canvas 2D rendering context.
Implementation of
HorizonCanvasLayerCanvasInstance
.context
isDisplayed
readonly
isDisplayed:boolean
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:52
Whether the canvas is displayed.
Implementation of
HorizonCanvasLayerCanvasInstance
.isDisplayed
Methods
clear()
clear():
void
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:57
Clears this canvas.
Returns
void
Implementation of
HorizonCanvasLayerCanvasInstance
.clear
reset()
reset():
void
Defined in: src/sdk/components/horizon/layers/HorizonCanvasLayer.tsx:62
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