SvgDecoder

constructor(source: ImageSource, options: Options, useViewBoundsAsIntrinsicSize: Boolean = true, renderToBitmap: Boolean = true, scaleToDensity: Boolean = false)

Parameters

useViewBoundsAsIntrinsicSize

If true, uses the SVG's view bounds as the intrinsic size for the SVG. If false, uses the SVG's width/height as the intrinsic size for the SVG.

renderToBitmap

If true, renders the SVG to a bitmap immediately after decoding. Else, the SVG will be rendered at draw time. Rendering at draw time is more memory efficient, but depending on the complexity of the SVG, can be slow.

scaleToDensity

If true and the target size is Size.ORIGINAL, multiplies the source dimensions of the image by the device's display density. NOTE: This only affects Android.