Einhugur SVG Plugin for Xojo

Image.ToRawBitmap Method

Creates suitable RawBitmap object and renders the SVG image into the bitmap. This variation also recolours single color SVG’s.

ToRawBitmap(
   width as UInt32,
   Height as UInt32,
   r as Double,
   g as Double,
   b as Double,
   a as Double) as RawBitmap

Parameters

width
Desired width of the bitmap or zero.
Height
Desired height of the bitmap or zero.
r
Red color value (0.0 to 1.0).
g
Green color value (0.0 to 1.0).
b
Blue color value (0.0 to 1.0).
a
Alpha color value (0.0 to 1.0).

Returns

RawBitmap

Remarks

If both width and height are zero then you get RawBitmap in same size as the the actual SVG size.

If one of the width and height parameters is zero then you will get proportionally correct scaling.

This method can also be used on multicolour SVG’s but then all the elements of the SVG will get the same new color.

This function can throw OutOfMemoryException

See Also

Image Class