getAsBitmap

fun getAsBitmap(width: Int, height: Int): Bitmap?

Renders the SVG data into a Bitmap object with specified width and height.

Return

A Bitmap object containing the rendered SVG, or null if the SVG parsing or rendering fails.

Parameters

width

The width of the bitmap.

height

The height of the bitmap.


fun getAsBitmap(width: Int): Bitmap?

Renders the SVG data into a Bitmap object with specified width. The height will be calculated based on SVG aspect ratio.

Return

A Bitmap object containing the rendered SVG, or null if the SVG parsing or rendering fails.

Parameters

width

The width of the bitmap.