Vectorized

data class Vectorized(val hairlineWidthPx: Float = 1.0f, val canvasDecorator: KiteCanvasDecorator? = null) : KiteRenderSpec

Redraw each page into a live Canvas every composition, transformed by zoom/pan via the same GPU layer: no bitmap (lower memory), resolution-independent quality at rest on every platform. On Android the vector display list replays under the live transform, so it stays crisp even mid-pinch; on Skia targets (iOS/desktop/web) the layer is texture-cached, so deep in-gesture zoom softens until the draw re-runs. Per-page draw cost scales with content complexity. Best for simple pages, deep-zoom crispness, and low memory.

The page is drawn inside the Compose draw pass, on the UI thread, and it is parsed and painted again on every redraw, so a dense page can drop frames. Rasterized renders off the main thread instead.

Parameters

hairlineWidthPx

the width in device pixels of a stroke whose line width is 0; 1 = the one device pixel of ISO 32000-1, 8.4.3.2. Other thin strokes (ECG traces, fine borders) widen to a fifth of it, as MuPDF draws them. There is no supersampling knob: vector output is already resolution-independent.

Constructors

Link copied to clipboard
constructor(hairlineWidthPx: Float = 1.0f, canvasDecorator: KiteCanvasDecorator? = null)

Properties

Link copied to clipboard

Wraps each live page paint pass on the UI thread.

Link copied to clipboard