Skip to content

TextureCanvasHandle

Defined in: sdk/src/render/textureCanvas.ts:21

A canvas you can paste textures into.

readonly height: number

Defined in: sdk/src/render/textureCanvas.ts:25


readonly texture: number

Defined in: sdk/src/render/textureCanvas.ts:23

Resource-table handle of the canvas — what Sprite.texture takes. Show it with no flipY.


readonly width: number

Defined in: sdk/src/render/textureCanvas.ts:24

clear(): void

Defined in: sdk/src/render/textureCanvas.ts:33

Back to transparent, forgetting everything pasted.

void


draw(source, x, y, width?, height?): void

Defined in: sdk/src/render/textureCanvas.ts:31

Pastes source (a texture handle) with its top-left corner at (x, y), counted in pixels from the canvas’s top-left. It is drawn at its own size unless width and height are given. Pictures blend over what is already there, in the order they are pasted.

number

number

number

number

number

void


release(): void

Defined in: sdk/src/render/textureCanvas.ts:35

Frees the canvas. The pasted textures are not touched.

void