Permalink
Browse files

ofxSvg: fixes example, addon folder structure + a crash

  • Loading branch information...
arturoc committed Aug 9, 2012
1 parent 7eec04c commit c49e0374f082053cdff70265a46e1bd01c662b21
Binary file not shown.
@@ -14,7 +14,7 @@
#include <string.h>
//#include <libxml/parser.h>
//#include <libxml/debugXML.h>
-#include "/Users/joshua.noble/code/OF/0071_osx/addons/ofxXmlSettings/libs/tinyxml.h"
+#include "tinyxml.h"
#include "svgtiny.h"
#include "svgtiny_internal.h"
@@ -1004,9 +1004,9 @@ void svgtiny_parse_paint_attributes(const Poco::XML::Element *node,
//const char *name = (const char *) attr->Name();
//const char *content = (const char *) attr->Value();
-
- const char *name = (const char *) map->item(i)->localName().c_str();
- const char *content = (const char *) map->item(i)->getNodeValue().c_str();
+ attr = (Poco::XML::Attr*) map->item(i);
+ const char *name = (const char *) attr->localName().c_str();
+ const char *content = (const char *) attr->getNodeValue().c_str();
if (strcmp(name, "fill") == 0)
svgtiny_parse_color(content, &state->fill, state);
@@ -10,6 +10,7 @@
#include <string.h>
#include "svgtiny.h"
#include "svgtiny_internal.h"
+#include <stdio.h>
#undef GRADIENT_DEBUG
@@ -115,7 +115,7 @@ void ofxSVG::setupShape(struct svgtiny_shape * shape){
}
else{
//cout << "error\n" << endl;
- ofLog("SVG parse error");
+ ofLogError() << "SVG parse error";
i += 1;
}
}
@@ -116,4 +116,4 @@ void testApp::gotMessage(ofMessage msg)
void testApp::dragEvent(ofDragInfo dragInfo)
{
-}
+}
@@ -1,7 +1,7 @@
#pragma once
#include "ofMain.h"
-#include "ofSVG.h"
+#include "ofxSVG.h"
class testApp : public ofBaseApp{
@@ -20,6 +20,6 @@ class testApp : public ofBaseApp{
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
- ofSVG svg;
+ ofxSVG svg;
};

0 comments on commit c49e037

Please sign in to comment.