rasterizeHeadless
Rasterizes ordered portable commands into an immutable physical ARGB image.
Commands are snapshotted before allocation; callers must not mutate the input graph concurrently. Coordinates are top-left, x-right, y-down, with half-open edges clipped to the viewport and nested child clips. Integer BlitImage samples logical pixel centers and replicates at scale; BlitImagePixels and SampledImage sample final physical pixel centers. Clipping preserves the original source mapping. SampledImage applies normalized tint and alpha cutoff before blending. Output starts transparent black and uses straight-ARGB source-over with half-up rounding per command, without gamma conversion. Exact arithmetic is defined in the rendering contract.
Return
a new image whose dimensions are the checked viewport dimensions multiplied by scale.
Parameters
draw commands in execution order; opaque platform commands are unsupported.
positive logical extent.
positive integer logical-to-physical scale.
Throws
for invalid dimensions/scale, unsupported commands, Java null commands, or unbalanced clips.
when physical dimensions, pixel area, or raster storage exceed Int.MAX_VALUE.