PdfCanvas
High-level drawing target. Implement this to add a new render backend; use PdfPage.renderTo to drive an existing one.
The PageRenderer walks the content stream, maintains the graphics-state stack, accumulates paths, and finally calls one of these device methods with a complete, ready-to-paint primitive. Backends therefore don't need to track the CTM, the current path, or text positioning — they just receive the final geometry plus the transform to apply.
Concrete implementations shipped:
ComposeCanvas(:kitepdf-compose) — paints into a ComposeDrawScope.SkiaCanvas(:kitepdf-skia) — paints into a SkiaCanvasfor JVM.AwtCanvas/AndroidNativeCanvas/CoreGraphicsCanvas/Canvas2dCanvas(:kitepdf-native-renderer) — host-platform raster backends.
Inheritors
Functions
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.