kritzikratzi / ofxSvgLoader

Addon for OpenFrameworks for parsing svg files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ofxSvgLoader

Addon for OpenFrameworks for parsing svg files. Uses Libsvgtiny for parsing paths.

Current version compatible with OpenFrameworks 09.
OF 0.7->0.8.4: https://github.com/NickHardeman/ofxSvgLoader/releases/tag/1.0

Loads a svg file and parses it for easy navigation.
Groups, rectangles, images, circles, ellipses, text and paths/lines.

Several use cases are shown in the provided example.

Grab a group by passing in the name of the group.
shared_ptr logoGroup = svg.get< ofxSvgGroup>("logo");

Grab nested groups by passing in the hierarchy to the group separated by colons.
shared_ptr cloudGroup = svg.get< ofxSvgGroup>("sky:clouds");

Get all of the elements of a certain type by calling getElementsForType
vector< shared_ptr > trees = svg.getElementsForType< ofxSvgImage >("trees");

About

Addon for OpenFrameworks for parsing svg files.


Languages

Language:C++ 90.2%Language:Makefile 8.2%Language:C 1.6%