PdfPattern

sealed class PdfPattern

Parsed /Pattern resource entry (ISO 32000-1 §8.7).

  • Tiling (PatternType = 1) — content-stream-based tiling. Parsed for completeness; the renderer falls back to the pattern's Tiling.baseColor.

  • Shading (PatternType = 2) — wraps a PdfShading under a matrix. This is the case the renderer paints as a real gradient.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Shading(val matrix: Matrix, val extGState: ExtGState?, val shading: PdfShading) : PdfPattern
Link copied to clipboard
data class Tiling(val matrix: Matrix, val extGState: ExtGState?, val paintType: Int, val tilingType: Int, val bbox: Rectangle, val xStep: Double, val yStep: Double, val contentBytes: ByteArray, val baseColor: RgbColor = RgbColor(0.5, 0.5, 0.5)) : PdfPattern

Tiling pattern (PatternType = 1). The content stream lives in contentBytes; full rendering requires laying out tiles across the filled region. We don't render that yet — callers get the dict description and an opaque grey fallback in baseColor.

Link copied to clipboard

A pattern we recognise but can't render yet (e.g. tiling, or one that failed to resolve). Fills using it are skipped rather than collapsing to the default colour — which would flood, say, a full-page background pattern solid black.

Properties

Link copied to clipboard
abstract val extGState: ExtGState?

Optional ExtGState applied while painting the pattern.

Link copied to clipboard
abstract val matrix: Matrix

Pattern-space-to-default-space transform (/Matrix).