Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

SVG support

 

bool RenderSVG(Painter& p, const char *svg, Event<String, String&> resloader)

bool RenderSVG(Painter& p, const char *svg)

Renders svg to Painter p. Use resloader to provide resources like images, first String of callback is resource name (filename), the data is to be returned in second parameter. Return empty String if resource not found..

 


 

void GetSVGDimensions(const char *svg, Sizef& sz, Rectf& viewbox)

Returns size and viewbox attributes of SVG.

 


 

Rectf GetSVGBoundingBox(const char *svg)

Computes the complete bounding box of SVG.

 


 

Rectf GetSVGPathBoundingBox(const char *path)

Returns the bounding box of SVG path stored in path element format.

 


 

Image RenderSVGImage(Size sz, const char *svg, Event<String, String&> resloader)

Image RenderSVGImage(Size sz, const char *svg)

Renders SVG into Image. This function basically ignores dimensions specified in SVG and uses computed bounding box. It is then scaled into sz at maximum size preserving aspect ratio. Use resloader to provide resources like images.

 


 

bool IsSVG(const char *svg)

Returns true if svg likely contains SVG image.

 

 

Do you want to contribute?