beginTransparencyGroup

open override fun beginTransparencyGroup(bbox: KiteRectangle, ctm: KiteMatrix, isolated: Boolean = false, knockout: Boolean = false, alpha: Double = 1.0, blendMode: KiteBlendMode = KiteBlendMode.Normal)(source)

Open a transparency group (ISO 32000-1 §11.4). Subsequent paints accumulate into an offscreen layer; endTransparencyGroup composites the layer back onto the parent with blendMode + alpha.

  • isolated: the paints composite onto a transparent backdrop, not onto what lies under the group (§11.4.5). The two differ only when a paint inside blends in a mode other than Normal. The PDF renderer passes true for a non-isolated group without such a paint when the group needs a layer anyway, because a transparent layer costs less.

  • knockout: each paint replaces what the earlier paints of the group left inside its shape (§11.4.6). The canvases composite each paint against a transparent backdrop, which is exact unless a paint inside blends in a mode other than Normal.

A non-isolated group with such a paint, which is a knockout group or has an alpha below 1 or a blend mode of its own, does not come here when the canvas's rasterStep can read the backdrop: the PDF renderer composites it from rasters as §11.4.8 says, and draws the result in one step.

Default implementation: a no-op pair so backends that don't model groups still render their content (just without isolation). That's incorrect for fancy compositing but produces something visible.