The OpenD Programming Language

rasterize

Rasterizes SVG image, returns RGBA image (non-premultiplied alpha).

nothrow @trusted @nogc
void
rasterize
(
NSVGrasterizer r
,
const(NSVG)* image
,
float tx
,
float ty
,
float scale
,
ubyte* dst
,
int w
,
int h
,
int stride = -1
)

Parameters

r NSVGrasterizer

pointer to rasterizer context

image const(NSVG)*

pointer to SVG image to rasterize tx, ty = image offset (applied after scaling)

scale float

image scale

dst ubyte*

pointer to destination image data, 4 bytes per pixel (RGBA)

w int

width of the image to render

h int

height of the image to render

stride int

number of bytes per scaleline in the destination buffer

Meta