MarkGeometry

Marks are described as polylines in unit space (centred on 0, roughly ±0.3) so that every style can be "drawn in" the same way: by walking a fraction of the total stroke length.

Functions

Link copied to clipboard
fun length(points: List<Offset>): Float
Link copied to clipboard
fun partial(strokes: List<List<Offset>>, fraction: Float): List<List<Offset>>

The first fraction (by length) of a set of strokes, drawn in order.

Link copied to clipboard
fun strokes(mark: Mark, style: MarkStyle, seed: Int): List<List<Offset>>