pub fn encode_ops_with_geometry(
ops: &[DrawOp],
) -> (Vec<f64>, Vec<String>, Vec<f64>)Expand description
encode_ops with a third, geometry channel: the points of every path and polygon (fills,
strokes, clips) as numbers instead of text. Such a record’s slot b is its offset into the
channel and slot c its count, and its texts entry is empty, so that channel stays
positional for a decoder that ignores the third one. Paths are written by
path_numbers, polygons by point_numbers.
Formatting a coordinate and parsing it back were, together, half of what a map tile’s export cost on Android (docs/canvas.md “Exporting”); a decoder that can take an array of doubles across its boundary skips both.