CanvasDrawTarget

CanvasDrawTarget represents the draw target that draws directly into the context canvas.

Hierarchy

Constructors

new CanvasDrawTarget(context: Context): CanvasDrawTarget

params

context The context this DrawTarget belongs to.

Properties

blendMode: BlendMode = "src-over"

The global blend mode.

context: Context

flipY: boolean = true

scissor: Rect | undefined

The rectangle that masks draw region.

transform: Transform = new Transform()

The global transform that applies to all drawables.

Accessors

get size(): Vec2

Methods

clear(color: Color): void

Clear this DrawTarget with color.

dispose(): void

draw(drawable: Drawable): void

Draws the Drawable into this DrawTarget.

use(): void