Skip to main content

Module raster

Module raster 

Source
Expand description

Path coverage in 16 by 16 tiles: per pixel, the average winding number over its area, mapped by the fill rule.

rasterize accumulates lines only in the columns an edge touches, one tile row at a time. Tiles no edge reaches take the winding of their run and become Full or Empty. The prefix sums add the same non-zero terms in the same order as dense::rasterize_dense, so both produce the same bytes. All code is scalar in a fixed order (f64 geometry, f32 accumulation, no FMA), so coverage is identical on every target.

Modules§

dense
The reference rasterizer, accumulating every pixel of the clip. super::rasterize must produce the same bytes.

Structs§

CoverageCache
An LRU coverage cache with a byte budget.
RasterScratch
Buffers reused from one rasterization to the next.
TileCoverage
A path’s coverage over a rectangle of whole tiles.

Enums§

TileState
What one tile of coverage holds.

Constants§

TILE
Tile edge, in pixels.
TILE_BYTES
Bytes of one tile’s coverage.

Functions§

coverage_key
The key of path’s coverage under rule in clip, hashed from exact bits.
flattened
The flattened lines rasterize accumulates for path, relative to the tile-aligned clip.
rasterize
The coverage of path under rule within clip (device pixels, grown to whole tiles).
tile_aligned
clip grown outward to whole tiles.
winding_at
The winding number of path around point from its flattened lines, for hit tests.