Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

SVG not showing

$
0
0

@eduzal wrote:

Hi, I’m trying to get a visualization of a simple SVG file but ofX is not rendering.
I have an svg file, with 860 polygons in it, not paths. is there an issue with svg polygons in ofX?

the code is very simple at this moment. getNumPath() is working. is giving me the correct answer, but it’s not rendering. what is the problem?

class ofApp : public ofBaseApp{

	public:
		void setup();
		void update();
		void draw();

		void keyPressed(int key);
		void keyReleased(int key);
		void mouseMoved(int x, int y );
		void mouseDragged(int x, int y, int button);
		void mousePressed(int x, int y, int button);
		void mouseReleased(int x, int y, int button);
		void mouseEntered(int x, int y);
		void mouseExited(int x, int y);
		void windowResized(int w, int h);
		void dragEvent(ofDragInfo dragInfo);
		void gotMessage(ofMessage msg);
    
        ofxSVG svg;
		
};
void ofApp::setup(){

    ofBackground(255);
    ofSetColor(0);
    
    svg.load("tijolos2.svg");
    cout<<svg.getNumPath(); 
}

void ofApp::draw(){
    ofDrawBitmapString(ofToString(ofGetFrameRate()),20,20);
  
    svg.draw();
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles