Skip to content
Addon for OpenFrameworks for parsing svg files.
C++ Makefile C
Branch: master
Clone or download
Latest commit bac786d Sep 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example-Text updates for OF 10 Sep 24, 2019
Example updates for OF 10 Sep 24, 2019
libs/svgTiny/src
src
.gitignore
README.md
addon_config.mk updates for OF 10 Sep 24, 2019
ofxaddons_thumbnail.png thumb Aug 3, 2015

README.md

ofxSvgLoader

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

Current version compatible with OpenFrameworks 10.
OF 0.9->0.98 https://github.com/NickHardeman/ofxSvgLoader/releases/tag/v1.1

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");

System fonts are supported. Also searches for a folder "fonts" in the same directory as loaded svg file for cross platform compatability.

You can’t perform that action at this time.