Expand description
Gradients and image fills: registered once, named by id wherever a colour can go.
A brush does not fit where a colour fits. A Paint is two words on the wire and a
gradient is a list of stops, so the brush travels the way a picture does: registered
before anything draws it, kept by the Renderer, and named by id after that. That is
the road [crate::asset] already built, and this is a second kind of traffic on it
rather than a second road.
The bytes are this module’s own fixed layout and not a file format. No platform stores a list of stops as a document, so a format would be a parser to write, to keep, and to get wrong.
Structs§
- Stop
- A stop: where along the run it sits, and what colour it is there.
Enums§
- Brush
- What a surface can be filled with beyond a flat colour.
Constants§
- HEADER_
LEN - A kind, a stop count, a tile mode, two bytes of padding and four coordinates.
- STOP_
LEN - A position and a colour.
Functions§
- brush
- Registers a brush and returns the
Paintthat names it.