Scalable Vector Graphics
+ Collaboration diagram for Scalable Vector Graphics:

Functions

t_jsvgjsvg_create_from_file (const char *filename, short path)
 Read an SVG file, return a t_jsvg object.
t_jsvgjsvg_create_from_resource (const void *moduleRef, const char *resname)
 Read an SVG file from a resource.
t_jsvgjsvg_create_from_xmlstring (const char *svgXML)
 Create an SVG object from a string containing the SVG's XML.
void jsvg_get_size (t_jsvg *svg, double *width, double *height)
 Retrieve the size of an SVG object.
void jsvg_destroy (t_jsvg *svg)
 Free a t_jsvg object.
void jsvg_render (t_jsvg *svg, t_jgraphics *g)
 Render an SVG into a graphics context.

Function Documentation

t_jsvg* jsvg_create_from_file ( const char *  filename,
short  path 
)

Read an SVG file, return a t_jsvg object.

Parameters:
filenameThe name of the file to read.
pathThe path id of the file to read.
Returns:
A new SVG object.
t_jsvg* jsvg_create_from_resource ( const void *  moduleRef,
const char *  resname 
)

Read an SVG file from a resource.

Parameters:
moduleRefThe external's moduleRef.
resnameThe name of the SVG resource.
Returns:
A new SVG object.
See also:
jgraphics_image_surface_create_from_resource()
t_jsvg* jsvg_create_from_xmlstring ( const char *  svgXML)

Create an SVG object from a string containing the SVG's XML.

Parameters:
svgXMLThe SVG source.
Returns:
A new SVG object.
void jsvg_destroy ( t_jsvg svg)

Free a t_jsvg object.

Parameters:
svgThe object to free.
void jsvg_get_size ( t_jsvg svg,
double *  width,
double *  height 
)

Retrieve the size of an SVG object.

Parameters:
svgAn SVG object.
widthThe address of a variable that will be set to the width upon return.
heightThe address of a variable that will be set to the width upon return.
void jsvg_render ( t_jsvg svg,
t_jgraphics g 
)

Render an SVG into a graphics context.

Parameters:
svgThe SVG object to render.
gThe graphics context in which to render.