VectorNode

data class VectorNode(val image: VectorImage, val width: Dp?, val height: Dp?, val tint: PdfColor? = null, val strokeOverride: VectorStrokeMode = VectorStrokeMode.Inherit) : PdfNode

Vector graphic — an SVG / Android <vector> icon embedded into the document at the requested rendered size.

The renderer scales image's viewport into the destination rectangle preserving aspect ratio when one of width / height is null. When both are null the VectorImage.intrinsicWidth / VectorImage.intrinsicHeight are used (Compose-style fallback).

Constructors

Link copied to clipboard
constructor(image: VectorImage, width: Dp?, height: Dp?, tint: PdfColor? = null, strokeOverride: VectorStrokeMode = VectorStrokeMode.Inherit)

Properties

Link copied to clipboard
val height: Dp?

rendered height on the page; same fallback rules.

Link copied to clipboard

parsed vector graphic.

Link copied to clipboard

controls how the parsed stroke colour from the source XML is treated at draw time. See VectorStrokeMode for the options.

Link copied to clipboard
val tint: PdfColor? = null

optional colour that overrides every path's fill. Useful when the same icon needs to render in different brand colours without re-authoring the XML.

Link copied to clipboard
val width: Dp?

rendered width on the page; null derives from the intrinsic aspect ratio when height is given.