RichSegment

data class RichSegment(val text: String, val style: TextStyle, val xOffset: Float, val width: Float, val yOffset: Float = 0.0f)

One segment of a wrapped rich-text line. Multiple segments make up a RichLine; each segment carries its own style so the renderer can issue a single drawText call per segment without losing the per-span formatting.

Constructors

Link copied to clipboard
constructor(text: String, style: TextStyle, xOffset: Float, width: Float, yOffset: Float = 0.0f)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Advance width of text at style.

Link copied to clipboard

Distance from the start of the line to this segment's left edge.

Link copied to clipboard
val yOffset: Float = 0.0f

Vertical shift from the line's top edge, in PDF points. Non-zero only for superscript / subscript segments, whose baseline is moved relative to the line's dominant baseline.