CanvasScope

value class CanvasScope(source)

Local pixel drawing clipped to this region and its ancestors. Does not clear or publish a frame.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun clear(color: Int = 0)
Link copied to clipboard
fun fillRect(bounds: Rect2i, color: Int)
fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int)
Link copied to clipboard
fun image(position: Position2i, size: Size2i, pixels: IntArray)

Tight row-major RGB image; clipping precedes transfer, preserving the existing image limits.

Link copied to clipboard
fun line(start: Position2i, end: Position2i, color: Int)
fun line(x0: Int, y0: Int, x1: Int, y1: Int, color: Int)
Link copied to clipboard
fun pixel(position: Position2i, color: Int)
fun pixel(x: Int, y: Int, color: Int)
Link copied to clipboard
fun rect(bounds: Rect2i, color: Int)
Link copied to clipboard
fun text(position: Position2i, text: String, color: Int = 16777215, scale: Int = 1)
fun text(x: Int, y: Int, text: String, color: Int = 16777215, scale: Int = 1)