StripGenerator class
Fine-rasterizes fills, strokes, and glyph outlines into a StripBuffer.
Per fill: flatten to device-space edges (Wang's bound, same semantics as
flattenPath) -> clip to the viewport (x-clipping projects offscreen
portions onto the viewport edge so winding is preserved) -> y-slice
edges into 4-px strip rows via intrusive typed-array linked lists ->
font-rs signed-area accumulation into a reused Float32List (4 scanlines
x row width) -> per-column prefix sum -> fill rule (nonzero
min(1,|w|), even-odd triangle wave |w - 2 round(w/2)|) -> strip
emission (zero runs skipped, all-255 runs of >= 2 columns become solid
strips, mixed columns append alpha texels). Only the touched accumulator
span is zeroed behind the scan.
Constructors
Properties
- glyphCache ↔ GlyphStripCache?
-
Replayable glyph strip cache consulted by fillOutline. Defaults to
the process-wide GlyphStripCache.shared; set null to rasterize every
glyph directly (unquantized - the pre-cache behavior).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
no setter
- rowCount → int
-
Number of 4-px strip rows covering the viewport.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shapeCache ↔ ShapeStripCache?
-
Replayable stroke/fill strip cache consulted by fillPath and
strokePath for small paths (repeated CAD symbols, hatch strokes,
dimension arrows). Content-keyed - repeated geometry rarely shares
object identity, so the key is the translation-invariant quantized
outline (1/64 px deltas from the first point) plus stroke/fill
parameters and a 1/8-px anchor subpixel phase (the glyph cache's
scheme, finer grid; y phase stays within the 4-px strip row so
replays are row-aligned). Set null to rasterize every path directly (unquantized).
getter/setter pair
- strips → StripBuffer
-
final
- width → int
-
no setter
Methods
-
begin(
int width, int height) → void - Starts a new page/batch: sets the device viewport (pixels) and clears the strip buffer. Scratch buffers are kept and only grow.
-
fillContours(
StrokeContours contours, int rgba) → void -
Fills stroke-expansion
contours(device space) with the nonzero rule. -
fillOutline(
FlattenedOutline outline, PdfMatrix emToDevice, int rgba) → void -
Fills a cached em-space glyph
outlinethroughemToDevice(em space -> device pixels): transform-and-bin, no re-flattening. Glyph outlines fill nonzero (§9.4). -
fillPath(
PdfPath path, PdfMatrix transform, PdfFillRule rule, int rgba, {double tolerance = 0.25}) → void -
Fills
path(page space) mapped throughtransforminto device space.rgbais a premultiplied color from premulRgba8. -
fillSubpaths(
List< FlatSubpath> subpaths, PdfFillRule rule, int rgba) → void - Fills already-flattened device-space subpaths (each implicitly closed - PDF fill semantics).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
strokePath(
PdfPath path, PdfMatrix transform, PdfStroke stroke, int rgba, {double tolerance = 0.25}) → void -
Strokes
path(page space, stroke parameters in page space like PdfDevice.strokePath) by expanding to closed contours and filling them nonzero. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited