public static class GlyphRasterizerFills a glyph outline into a coverage bitmap, by scanline and non-zero winding.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
This exists to be an oracle before it exists to draw anything. A distance field is judged by reconstructing coverage from it and comparing against a rasterisation of the same outline — two independent routes to one shape — and that is a much stronger gate than a golden image, which only says the output has not changed.
⚠ Non-zero winding, not even-odd. A counter in an o is a contour wound the other way, and every font relies on it; even-odd gives the same answer for one hole and the wrong one for a glyph whose contours overlap, which happens in scripts that build a letter out of stacked strokes.
Methods (1)
public static CoverageBitmap Rasterize(GlyphOutline outline, int width, int height, float scale, Vector2 origin)Rasterises an outline into a bitmap of a given size.
Used by (3)
- DistanceFieldVixen.Ui.Text
- DistanceFieldTestsVixen.Ui.Text.Tests
- RasterizerTestsVixen.Ui.Text.Tests