Expand description
Pixel arithmetic.
Everything here is integer. There is no f32 in the rasteriser at all, which
buys three things: no libm dependency in a no_std build, no FPU traffic on
targets where that is expensive, and — most usefully — output that is
bit-identical on x86 and ARM, so a golden-image test is a meaningful test.
Structs§
- Paint
- A colour prepared for drawing.
Functions§
- blend_
pixel - Composites a paint over a single pixel at
coverage(0..=255). - blend_
span - Composites a constant paint over a span.
- fill_
span - Overwrites a span with an opaque word.
- premultiply
- Premultiplies straight-alpha
0xAARRGGBBwords in place. - scale_
premul - Scales a premultiplied
0xAARRGGBBword — alpha lane included — by a coverage of0..=255. - source_
over - Composites a premultiplied source over a destination pixel.