Picasso API  2.8
Functions
XSvg Functions

Functions

PEXPORT psx_result PICAPI psx_svg_init (void)
 Initialze the library and load resources. More...
 
PEXPORT void PICAPI psx_svg_shutdown (void)
 Release resources and shutdoen. More...
 
PEXPORT psx_svg *PICAPI psx_svg_load (const char *file_name, psx_result *err_code)
 Create a new psx_svg object and load from file. More...
 
PEXPORT psx_svg *PICAPI psx_svg_load_from_memory (const ps_byte *data, size_t length, psx_result *err_code)
 Create a new psx_svg object and load data from memory. More...
 
PEXPORT void PICAPI psx_svg_destroy (psx_svg *doc)
 Destroy the psx_svg object and release resources. More...
 
PEXPORT void PICAPI psx_svg_render_destroy (psx_svg_render *render)
 Destroy the psx_svg_render object and release resources. More...
 
PEXPORT psx_result PICAPI psx_svg_render_draw (ps_context *ctx, const psx_svg_render *render)
 Draws an psx_svg_render object into the given context. More...
 

Detailed Description

Function Documentation

◆ psx_svg_destroy()

void psx_svg_destroy ( psx_svg doc)

Destroy the psx_svg object and release resources.

Parameters
docPointer to an existing psx_svg object.
See also
psx_svg_load psx_svg_load_from_memory

◆ psx_svg_init()

psx_result psx_svg_init ( void  )

Initialze the library and load resources.

Returns
Result code returned.
See also
psx_svg_shutdown

◆ psx_svg_load()

psx_svg * psx_svg_load ( const char *  file_name,
psx_result err_code 
)

Create a new psx_svg object and load from file.

Parameters
file_nameThe svg file path which will be loaded, which is encoded by utf8.
err_codePointer to a value to receiving the result code. can be NULL.
Returns
If successs, the return value is the pointer to new psx_svg object. If fails, the return value is NULL, and result will be return by err_code.
See also
psx_svg_destroy psx_svg_load_from_memory

◆ psx_svg_load_from_memory()

psx_svg * psx_svg_load_from_memory ( const ps_byte data,
size_t  length,
psx_result err_code 
)

Create a new psx_svg object and load data from memory.

Parameters
dataPointer to data buffer in memeory.
lengthData length bytes.
err_codePointer to a value to receiving the result code. can be NULL.
Returns
If successs, the return value is the pointer to new psx_svg object. If fails, the return value is NULL, and result will be return by err_code.
See also
psx_svg_destroy psx_svg_load

◆ psx_svg_render_destroy()

void psx_svg_render_destroy ( psx_svg_render render)

Destroy the psx_svg_render object and release resources.

Parameters
renderPointer to an existing psx_svg_render object.
See also
psx_svg_render_draw psx_svg_render_create

◆ psx_svg_render_draw()

psx_result PICAPI psx_svg_render_draw ( ps_context ctx,
const psx_svg_render render 
)

Draws an psx_svg_render object into the given context.

Parameters
ctxPointer to an existing context object.
renderPointer to an existing psx_svg_render object.
Returns
Result code returned.
See also
psx_svg_render_draw psx_svg_render_create

◆ psx_svg_shutdown()

void psx_svg_shutdown ( void  )

Release resources and shutdoen.

See also
psx_svg_init