TextureCanvasHandle
此内容尚不支持你的语言。
Defined in: sdk/src/render/textureCanvas.ts:21
A canvas you can paste textures into.
Properties
Section titled “Properties”height
Section titled “height”
readonlyheight:number
Defined in: sdk/src/render/textureCanvas.ts:25
texture
Section titled “texture”
readonlytexture:number
Defined in: sdk/src/render/textureCanvas.ts:23
Resource-table handle of the canvas — what Sprite.texture takes. Show it with no flipY.
readonlywidth:number
Defined in: sdk/src/render/textureCanvas.ts:24
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: sdk/src/render/textureCanvas.ts:33
Back to transparent, forgetting everything pasted.
Returns
Section titled “Returns”void
draw()
Section titled “draw()”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.
Parameters
Section titled “Parameters”source
Section titled “source”number
number
number
width?
Section titled “width?”number
height?
Section titled “height?”number
Returns
Section titled “Returns”void
release()
Section titled “release()”release():
void
Defined in: sdk/src/render/textureCanvas.ts:35
Frees the canvas. The pasted textures are not touched.
Returns
Section titled “Returns”void