← back to roto on ba3a.dev

DraftFinisher

Finishes one key frame's draft, shaded at factor times the canvas: MajorityReduce to the canvas, OrphanCleanup, RampDither when the clip asks for it, and the Outline last, so neither cleanup nor dither ever touches it. The hold compares a key frame's reduction with the previous key frame's reduction, before cleanup, dither and outline: holding to the finished draft would carry the outline's colour into the next frame's interior.

Functions

Link copied to clipboard
fun complete(reduced: Draft, colours: DraftColours, settings: DraftSettings): Draft

The reduced draft cleaned, dithered when settings ask, and outlined with colours.

Link copied to clipboard
fun finish(shaded: IndexedRaster, zones: IndexedRaster, factor: Int, colours: DraftColours, settings: DraftSettings, previous: Draft? = null): Draft

The finished Draft of shaded colours and zones at factor times the canvas, drawn with colours and settings, held to previous, the previous key frame's reduce.

Link copied to clipboard
fun reduce(shaded: IndexedRaster, zones: IndexedRaster, factor: Int, settings: DraftSettings, previous: Draft?): Draft

The MajorityReduce of shaded and zones, held to previous by the settings' hold.