pub enum Region {
Whole,
Rect(DeviceRect),
}Expand description
How much of the page a render draws.
Variants§
Whole
The page’s whole device box, which must fit MAX_TARGET_DIMENSION
on both axes.
Rect(DeviceRect)
Only this rectangle of the device box, into a pixmap of exactly its
size. The page’s full device size is not allocated and so is not
bound by MAX_TARGET_DIMENSION; the rectangle must lie inside it,
else Error::RegionOutOfBounds.
§Seams
The walk is the whole page’s: the page matrix, the pixel rounding of every object’s extent, the glyph snap and the culling are computed in the whole render’s frame, and only the target is the rectangle’s size. So a tile’s pixels are the whole render’s, except where the rasterizer’s own arithmetic depends on where the target starts:
vello_cpuflattens inf32, and a tile’s geometry is the whole page’s shifted by whole pixels, which can round differently. Tiles are byte-identical to the whole render in this crate’s and the facade’s tests, and otherwise differ by one count on an occasional antialiased edge pixel — never by a pixel of content.tiny-skiaand the AGG port integrate coverage in a way that depends on where an edge enters the target, so a seam can differ by a few counts along an edge.- A transparency group, soft mask or pattern cell that the rectangle’s edge cuts is drawn in a buffer that starts at the edge, not at the group’s own corner; the same integer shift, the same few counts.
Tiles on a grid are rendered the same way every time: the output is a function of the page, the options and the rectangle.