toVectorImage

suspend fun <Error class: unknown class>.toVectorImage(): <Error class: unknown class>

Loads a Compose Multiplatform DrawableResource containing Android <vector> XML or W3C <svg> and parses it into a VectorImage ready to be drawn by vector(image = ...).

Parse once, draw many times — when the same icon appears in multiple places in the document, hold on to the returned VectorImage and pass it to every vector(...) call site instead of re-parsing.

Throws com.conamobile.pdfkmp.vector.VectorParseException when the resource exists but isn't a valid Android-Vector / SVG payload.

Receiver

a Res.drawable.* reference pointing at an XML drawable.