RenderScope

class RenderScope<C : RenderingContext>(val ctx: C, val width: Int, val height: Int, val colorMode: ColorMode, val elapsedMs: Double)(source)

Arguments passed to the user's render callback.

Parameters

ctx

The canvas context which provides drawing functionality.

width

The width (in pixels) of this canvas.

height

The height (in pixels) of this canvas.

colorMode

The active color mode used by the site.

elapsedMs

Time elapsed since last frame.

C

The type of the canvas context

Constructors

Link copied to clipboard
constructor(ctx: C, width: Int, height: Int, colorMode: ColorMode, elapsedMs: Double)

Properties

Link copied to clipboard
Link copied to clipboard
val ctx: C
Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
val width: Int