Canvas2dCanvas
KiteCanvas backed by a browser-side CanvasRenderingContext2D. Pure Kotlin/JS + DOM: no Compose for Web, no Skia/WASM bundle.
The right choice for in-browser PDF viewers that want minimal bundle size and to inherit whatever rendering acceleration the browser already provides for <canvas>.
Honest scope:
Path operations, gradients, blend modes (all 16) and clipping use the standard Canvas2D API. A transparency group with an alpha or a blend mode, and a soft mask, paint into an offscreen canvas that composites onto the page once.
Embedded image XObjects: a RAW image, which is what the shared decoders produce, paints synchronously. Every other kind paints a placeholder, as on every canvas (#184).
Functions
ISO 32000-1, 11.6.5.2: the content and the mask group each paint into a layer of their own. The mask layer's alpha, or for a luminosity mask its luminosity over a black backdrop, gates the content layer, which then composites onto the page. The mask group's colours never reach the page (#161). The transfer table maps each mask value.
ISO 32000-1, 11.4.5: a group's constant alpha and blend mode apply once, when the group composites onto its backdrop. So a group that has them paints into a layer first (#77). An isolated group's layer starts transparent. A non-isolated group's layer starts as a copy of the backdrop, so a paint inside blends with the page, and at the end the layer mixes with the page by alpha. That is exact over an opaque backdrop. A non-isolated group with a blend mode of its own starts transparent, which is exact when no paint inside blends (#125).