Download svg with Cairo

I want to upload an SVG file to the Cairo library, apply some transformations to it. Then I want to display svg using glTexture.

But I just find functions that create the svg file and do not load svg.

+4
source share
1 answer

Cairo itself cannot read SVG files. You need something like librsvg to display SVG on the surface of Cairo.

From a quick overview of their API documentation , it looks like you need to rsvg_handle_new_from_file()download a file and something like rsvg_handle_render_cairo()or rsvg_handle_get_pixbuf()in order to draw an SVG in the context of Cairo / in order to turn an SVG into GdkPixbuf.

+5
source

All Articles