StripPlanBinner class
Headless subclass of the binning core: collects the StripBatchData emitted at each flush point (delegated ops are no-ops) into a StripPlan. Feed it the page's command list with bin - which honors a PdfCancellationToken cooperatively - then take finish's plan.
- Inheritance
-
- Object
- StripBinningDevice
- StripPlanBinner
Constructors
Properties
-
batches
→ List<
StripBatchData> -
final
- binningEnabled → bool
-
Whether strip-routed ops actually feed generator. False in
precomputed-plan mode: routing and flush ordinals still advance, but
no flatten/stroke-expansion/coverage work runs.
finalinherited
- delegateAll → bool
-
Debug routing predicates (see the class doc).
finalinherited
- delegatedPaintCount ↔ int
-
Delegated paint ops routed through the fallback so far.
getter/setter pairinherited
- delegateFills → bool
-
finalinherited
- delegateStrokes → bool
-
finalinherited
- delegateText → bool
-
finalinherited
- deviceHeight → int
-
finalinherited
- deviceWidth → int
-
finalinherited
- flushPointCount → int
-
Flush points seen so far (every flush point counts, empty or not).
no setterinherited
- generator → StripGenerator
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- pageToDevice → PdfMatrix
-
Page space (PDF user space, y-up) -> device pixels (y-down), including
/Rotate and pixelRatio.
finalinherited
- pixelRatio → double
-
The ratio baked into pageToDevice; binned strips are only valid at
this ratio.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slugBatches
→ List<
SlugBatchData> -
final
-
slugFallbackOrdinals
→ List<
int> -
final
- slugFallbackOutlineRuns ↔ int
-
getter/setter pair
- slugGlyphs → bool
-
final
- slugMinGlyphPx → double
-
final
- slugQuadCount ↔ int
-
getter/setter pair
- stripsActive → bool
-
Whether paint ops may take the strip path right now: normal blend and
not directly inside a knockout group (knockout elements composite with
BlendMode.src, which batched srcOver quads can't express).
no setterinherited
Methods
-
beginGroup(
double alpha, {bool knockout = false}) → void -
Brackets a transparency-group form (§11.6.6) whose composite result
paints at
alpha. Inside the group, alpha starts over at 1.0; the group then blends as one object. Non-compositing devices can treat the pair as a no-op - the group's content still arrives through the normal callbacks in between.inherited -
beginSoftMasked(
) → void -
Starts capturing painted content that an ExtGState /SMask will mask.
Visual devices open an offscreen layer; others can ignore the pair.
inherited
-
bin(
List< PdfRenderCommand> commands, {PdfCancellationToken? cancellation}) → Future<void> -
Replays
commandsthrough the binning core, yielding to the event loop (and checkingcancellation) every ~1024 commands so a worker's cancel message can preempt a long walk - the same cooperative scheme as the worker's record path. -
clipPath(
PdfPath path, PdfFillRule rule) → void -
Intersects the current clip with
path.inherited -
delegateBeginGroup(
double alpha, {required bool knockout}) → void -
override
-
delegateBeginSoftMaskComposite(
{required bool luminosity, required PdfRect backdrop, required double backdropLuminance, required double transferScale, required double transferOffset}) → void -
The two halves of the soft-mask composite. The base runs the mask
group's
drawMask()between them - through THIS device, so mask-group strips bin (and flush) identically on every subclass.override -
delegateBeginSoftMasked(
) → void -
override
-
delegateClipPath(
PdfPath path, PdfFillRule rule) → void -
override
-
delegateDrawImage(
PdfImageRequest request) → void -
override
-
delegateDrawText(
PdfTextRun run) → void -
override
-
delegateEndGroup(
) → void -
override
-
delegateFillMesh(
PdfMesh mesh, double alpha) → void -
override
-
delegateFillPath(
PdfPath path, PdfColor color, PdfFillRule rule, double alpha) → void -
Delegated paint ops (the base flushes before each).
override
-
delegateFillPathGradient(
PdfPath path, PdfFillRule rule, PdfGradient gradient, double alpha) → void -
override
-
delegateFinishSoftMaskComposite(
) → void -
override
-
delegateRestore(
) → void -
override
-
delegateSave(
) → void -
Delegated state ops (no pixels; not flush points except clipPath and
the group boundaries, which the base flushes before forwarding).
override
-
delegateSetBlendMode(
PdfBlendMode mode) → void -
override
-
delegateSetOverprint(
{required bool fill, required bool stroke, required int mode}) → void -
override
-
delegateStrokePath(
PdfPath path, PdfColor color, PdfStroke stroke, double alpha) → void -
override
-
drawImage(
PdfImageRequest request) → void -
inherited
-
drawText(
PdfTextRun run) → void -
override
-
emitBatch(
int ordinal, StripBatchData? data) → void -
Called at every flush point with the strips binned since the previous
one (
datanull when nothing was binned, or when binningEnabled is off).ordinalis the flush point's 0-based index.override -
endGroup(
) → void -
Composites the group opened by beginGroup.
inherited
-
endSoftMasked(
{required bool luminosity, required PdfRect backdrop, required void drawMask(), double backdropLuminance = 0, double transferScale = 1, double transferOffset = 0}) → void -
Ends the capture opened by beginSoftMasked.
drawMaskpaints the mask group's content through this same device; for luminosity masks the device converts the result's luminance to alpha over thebackdropbox, then composites it into the captured content (dstIn). Areas the mask group doesn't paint takebackdropLuminance(the luminance of the /BC backdrop colour, default black). The mask value is remapped through the /TR transfer function, linearised here asvalue * transferScale + transferOffset(identity by default). Devices that collect content fromdrawMask(e.g. image collectors) should invoke it even if they do no compositing.inherited -
fillMesh(
PdfMesh mesh, double alpha) → void -
Paints a Gouraud triangle mesh (mesh shadings, types 4–7). Vertices
arrive in page space. Non-painting devices can ignore it; simple
devices may fall back to PdfMesh.averageColor.
inherited
-
fillPath(
PdfPath path, PdfColor color, PdfFillRule rule, double alpha) → void -
inherited
-
fillPathGradient(
PdfPath path, PdfFillRule rule, PdfGradient gradient, double alpha) → void -
Fills with a gradient (axial/radial shading patterns and
sh). Non-painting devices can ignore it; simple devices may fall back tofillPathwith PdfGradient.averageColor.inherited -
finish(
) → StripPlan - Runs the final flush point and packages the plan. Call exactly once, after every command has been replayed.
-
flushPending(
) → void -
Runs one flush point: snapshots the generator's strips (when binning)
and hands them to emitBatch with this point's ordinal. Call once
more from the subclass's finish step so trailing strips land.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restore(
) → void -
Mirrors
Q.inherited -
save(
) → void -
Mirrors
q. Saved state must include the clip.inherited -
setBlendMode(
PdfBlendMode mode) → void -
Sets the blend mode for subsequent painting (gs /BM). Non-compositing
devices can ignore it.
inherited
-
setOverprint(
{required bool fill, required bool stroke, required int mode}) → void -
Sets the overprint state for subsequent painting (gs /OP, /op, /OPM;
PDF §8.6.7).
fillis nonstroking overprint (/op),strokeis stroking overprint (/OP), andmodeis the overprint mode (/OPM, 0 or 1).inherited -
strokePath(
PdfPath path, PdfColor color, PdfStroke stroke, double alpha) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited