Chapter 34
SVG Interpreter Details

The SVG interpreter offers very little API other than that exposed through the fz_document interface.

The sole extras are defined to facilitate the use of SVGs as illustrations within EPUB files.

/* 
   Parse an SVG document into a display-list. 
*/ 
fz_display_list *fz_new_display_list_from_svg(fz_context *ctx, fz_buffer *buf, float *w, float *h); 
 
/* 
   Create a scalable image from an SVG document. 
*/ 
fz_image *fz_new_image_from_svg(fz_context *ctx, fz_buffer *buf);

These enable the HTML agent to easily create a fz_image out of an SVG. This fz_image has the property that it remains scalable, and hence will not appear pixellated if the document is reflowed to different dimensions.