← back to roto on ba3a.dev

ModelCanvas

The one rule for a model frame drawn smaller than the project canvas, shared by every ModelSource: it is placed centred across, its bottom row on the canvas's bottom row, so the feet stay on the ground. Roto never rescales a model, so a frame larger than the canvas either way is refused.

Functions

Link copied to clipboard
fun place(what: String, frame: Raster, canvas: Canvas): Raster

frame on a transparent canvas: centred across, an odd gap leaving the extra column on the right, and bottom-aligned. A frame of canvas size comes back as it is; one that does not fit fails as in requireFits, naming what.

Link copied to clipboard
fun requireFits(what: String, width: Int, height: Int, canvas: Canvas)

Fails with a ModelException naming what when a width x height frame does not fit in canvas.