DrawingUtilitiesPixelsFromSvg Method (String, Int32, Int32, Boolean, Color) |
Get array of bytes that represent RGBA values for an image of a given
size created from SVG
Namespace:
Rhino.UI
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 8.0
Syntaxpublic static byte[] PixelsFromSvg(
string svg,
int width,
int height,
bool premultiplyAlpha,
Color backgroundColor
)
Public Shared Function PixelsFromSvg (
svg As String,
width As Integer,
height As Integer,
premultiplyAlpha As Boolean,
backgroundColor As Color
) As Byte()
Parameters
- svg
- Type: SystemString
A valid svg string - width
- Type: SystemInt32
Width of the svg in pixels - height
- Type: SystemInt32
Height of the svg in pixels - premultiplyAlpha
- Type: SystemBoolean
Pre-lends the background color with the pixels based on their alpha value - backgroundColor
- Type: System.DrawingColor
Background color - pass Color.Empty if you don't know what to pass.
Return Value
Type:
ByteNull on an exception, an array of
Color as bytes otherwise
See Also