PdfRasterGeometry

data class PdfRasterGeometry(val widthPx: Int, val heightPx: Int, val deviceCtm: KiteMatrix)

Output geometry for rasterizing a PdfPage at a given scale: how big the target surface must be, in device pixels, and the matrix that carries unscaled PDF user space onto it.

A rasterizer allocates a surface of widthPx x heightPx and paints with page.renderTo(canvas, deviceCtm). That is the whole contract: this is the one thing every convenience rasterizer (AWT, Android, Apple, Skia) needs from a page before it can draw it, so it is computed once, here, instead of once per backend.

Constructors

Link copied to clipboard
constructor(widthPx: Int, heightPx: Int, deviceCtm: KiteMatrix)

Properties

Link copied to clipboard

maps unscaled PDF user space onto [0, widthPx] x [0, heightPx], top-left origin, y growing downward.

Link copied to clipboard

target surface height in device pixels, at least 1.

Link copied to clipboard

target surface width in device pixels, at least 1.