DrawTarget

Hierarchy

Constructors

new DrawTarget(context: Context): DrawTarget

params

context The context this DrawTarget belongs to.

Properties

blendMode: BlendMode = "src-over"

The global blend mode.

context: Context

flipY: boolean = false

Whether y coordinate is flipped.

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

The size of this DrawTarget.

Methods

clear(color: Color): void

Clear this DrawTarget with color.

dispose(): void

draw(drawable: Drawable): void

Draws the Drawable into this DrawTarget.

use(): void