GraphicsStack

class GraphicsStack(initial: GraphicsState = GraphicsState(), maxDepth: Int = 64)

Mutable stack façade. Holds the current state plus a save stack for q/Q.

Callers update via the typed mutators (replaceCtm, setFillColor, etc.) or read the current state directly. The stack is bounded by maxDepth to defend against pathological PDFs that q-spam without Q.

Constructors

Link copied to clipboard
constructor(initial: GraphicsState = GraphicsState(), maxDepth: Int = 64)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun mutateText(block: (TextState) -> TextState)
Link copied to clipboard
Link copied to clipboard
fun restore()
Link copied to clipboard
fun save()