← back to roto on ba3a.dev

Draft

data class Draft(val colours: IndexedRaster, val zones: IndexedRaster)

A draft frame at canvas size: colours holds palette labels (palette index + 1, 0 background), zones the zone each pixel belongs to (0 background). The two always agree on where the figure is; the zone tells the outline and the dither which ramp a pixel's colour comes from.

Constructors

Link copied to clipboard
constructor(colours: IndexedRaster, zones: IndexedRaster)

Properties

Link copied to clipboard

palette labels, palette index + 1, 0 for background

Link copied to clipboard
val height: Int

The canvas height in pixels.

Link copied to clipboard
val width: Int

The canvas width in pixels.

Link copied to clipboard

the zone of each pixel, 0 for background

Functions

Link copied to clipboard
fun isFigure(x: Int, y: Int): Boolean

Whether (x, y) is on the canvas and part of the figure.