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

Cant draw svg using ofxSVG

$
0
0

@Julian_Puppo wrote:

Hello ! this may be a silly question.

I´ve been trying to draw a svg file into openframeworks but I just can´t seem to get it done. Nothing shows up.

i´ve already load ofxsvg addon into my proyect.

This is my code :

ofApp.h :

#pragma once

#include "ofMain.h"
#include "ofxSvg.h"
class ofApp : public ofBaseApp{

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

		ofShader sh;
		ofImage img;
		
		float size; 
		ofVec2f pos;
		ofxSVG heart;
};

ofApp.cpp :

#include "ofApp.h"
void ofApp::setup(){
	ofSetWindowShape(600, 600);	
	heart.load("SVG/heart.svg");
}
void ofApp::draw(){
	heart.draw();
}

Is there something obvious that I´ve may be missing ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles