ExtGState

data class ExtGState(val fillAlpha: Double? = null, val strokeAlpha: Double? = null, val blendMode: KiteBlendMode? = null, val softMask: SoftMask? = null, val lineWidth: Double? = null, val lineCap: Int? = null, val lineJoin: Int? = null, val miterLimit: Double? = null, val dashArray: List<Double>? = null, val dashPhase: Double = 0.0, val renderingIntent: KiteRenderingIntent? = null, val blackPointCompensation: Boolean? = null, val overprintStroke: Boolean? = null, val overprintFill: Boolean? = null, val overprintMode: Int? = null)(source)

Parsed Extended Graphics State (ISO 32000-1 §8.4.5).

Each /ExtGState /<name> resource is a dict of state-modifier entries. The gs content-stream operator merges them into the current GraphicsState. We extract only the fields we actually act on:

  • /CA: stroke alpha (0..1)

  • /ca: fill alpha (0..1)

  • /BM: blend mode (name or array of names)

  • /SMask: soft-mask dict ("None" / Mask dict)

  • /LW /LC /LJ /ML /D: line width, cap, join, miter limit and dash

  • /RI /UseBlackPtComp: rendering intent and black point compensation

  • /OP /op /OPM: overprint for strokes and fills, and the overprint mode

  • /AIS, /SA, /Font: accepted but ignored (rare)

Missing fields stay at their previous values; that's the spec's "ExtGState modifies the current state" rule.

Constructors

Link copied to clipboard
constructor(fillAlpha: Double? = null, strokeAlpha: Double? = null, blendMode: KiteBlendMode? = null, softMask: SoftMask? = null, lineWidth: Double? = null, lineCap: Int? = null, lineJoin: Int? = null, miterLimit: Double? = null, dashArray: List<Double>? = null, dashPhase: Double = 0.0, renderingIntent: KiteRenderingIntent? = null, blackPointCompensation: Boolean? = null, overprintStroke: Boolean? = null, overprintFill: Boolean? = null, overprintMode: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

/UseBlackPtComp of ISO 32000-2, 8.4.5: true for /ON, false for /OFF and /Default, as MuPDF reads it, or null when the dictionary does not set it.

Link copied to clipboard
Link copied to clipboard

/D's dash array, or null when the dictionary sets no dash. Empty means solid.

Link copied to clipboard

/D's dash phase, read together with dashArray.

Link copied to clipboard
Link copied to clipboard
val lineCap: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

/op: overprint for fills and other paints. When it is absent, /OP sets it too (ISO 32000-1, Table 58).

Link copied to clipboard

/OPM: the overprint mode, 0 or 1, or null when the dictionary does not set it.

Link copied to clipboard

/OP: overprint for strokes, or null when the dictionary does not set it.

Link copied to clipboard

/RI, or null when the dictionary sets no rendering intent.

Link copied to clipboard
Link copied to clipboard