← back to roto on ba3a.dev

OnionSkin

object OnionSkin

One raster from the current, previous and next frame: the previous frame tinted PREVIOUS_TINT and the next tinted NEXT_TINT, each at 30 % opacity, behind the current frame. Integer arithmetic only, so the result is the same on every machine.

Properties

Link copied to clipboard

The colour the next frame's figure is drawn in.

Link copied to clipboard

The colour the previous frame's figure is drawn in.

Functions

Link copied to clipboard
fun compose(current: Raster, previous: Raster?, next: Raster?): Raster

The onion skin of current with previous and next behind it; a frame that does not exist (the first or last of a clip that does not loop) is null. A ghost pixel takes its tint's colour and 30 % of the frame pixel's alpha, rounded to nearest.