Rasterized

constructor(quality: Float = 1.0f, maxBitmapLongSide: Int = 4096, rerasterizeOnZoom: Boolean = true, preserveHairlines: Boolean = true, cacheBudgetBytes: Long = 96L * 1024 * 1024, canvasDecorator: KiteCanvasDecorator? = null)

Parameters

quality

supersampling multiplier over the on-screen pixel size. 1 = rasterize exactly at display resolution (sharpest and cheapest, the default). >1 = oversample, e.g. for screenshots or print-ish export. <1 = undersample for cheap previews/thumbnails.

maxBitmapLongSide

hard cap on the longest bitmap side, protecting memory on huge pages and deep zooms. The viewer's rasterizer raises its pixel ceiling to this value squared, so any side length allowed here also renders.

rerasterizeOnZoom

after a zoom settles, re-render the visible page at the zoomed resolution so deep zoom stays crisp instead of upscaling the base raster. Costs one extra rasterization per zoom settle.

preserveHairlines

scale the engine's stroke floors by the ratio of the raster to the screen, so a zero-width stroke stays one screen pixel and other sub-pixel strokes (ECG traces, fine table rules) keep their weight when the bitmap is downscaled.