Skip to content

Commit

Permalink
svg exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
obviousjim committed Apr 8, 2014
1 parent 8defd24 commit 25628a1
Show file tree
Hide file tree
Showing 8 changed files with 2,890 additions and 0 deletions.
2,384 changes: 2,384 additions & 0 deletions CloudsSVGer/CloudsSVGer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions CloudsSVGer/Project.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
OF_PATH = ../../..

//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"

///////////////////////////////////////////
// ADDONS

// path to the addons dir
ADDONS_PATH = $(OF_PATH)/addons

// ofxOculusRift
OFX_OCULUSRIFT_HEADERS = $(ADDONS_PATH)/ofxOculusRift/src $(ADDONS_PATH)/ofxOculusRift/libs/LibOVR/Include
OFX_OCULUSRIFT_LIBS = "$(ADDONS_PATH)/ofxOculusRift/libs/LibOVR/Lib/MacOS/Release/libovr.a"

// all addons
OF_ADDON_HEADERS = $(OFX_OCULUSRIFT_HEADERS)
OF_ADDON_LIBS = $(OFX_OCULUSRIFT_LIBS)

///////////////////////////////////////////
// MAIN

HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OF_ADDON_HEADERS)
OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_ADDON_LIBS)

20 changes: 20 additions & 0 deletions CloudsSVGer/QuestionNode copy-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.openFrameworks</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
327 changes: 327 additions & 0 deletions CloudsSVGer/bin/data/textlayer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions CloudsSVGer/openFrameworks-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.openFrameworks</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
11 changes: 11 additions & 0 deletions CloudsSVGer/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "testApp.h"
#include "ofAppGlutWindow.h"

//--------------------------------------------------------------
int main(){
ofAppGlutWindow window; // create a window
// set width, height, mode (OF_WINDOW or OF_FULLSCREEN)
ofSetupOpenGL(&window, 1224, 768, OF_WINDOW);
ofRunApp(new testApp()); // start the app
}

74 changes: 74 additions & 0 deletions CloudsSVGer/src/testApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#include "testApp.h"

//--------------------------------------------------------------
void testApp::setup(){

ofBackground(0);
ofSetVerticalSync(true);

parser.loadFromFiles();
svgReader.parser = &parser;
}

//--------------------------------------------------------------
void testApp::update(){

}

//--------------------------------------------------------------
void testApp::draw(){
svgReader.draw();
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){

if(key == 'E'){
svgReader.exportFile("textlayer.svg");
}

}

//--------------------------------------------------------------
void testApp::exit(){
}

//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
svgReader.loadFile( dragInfo.files[0] );
}
27 changes: 27 additions & 0 deletions CloudsSVGer/src/testApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

#include "ofMain.h"
#include "CloudsFCPParser.h"
#include "CloudsSVGParser.h"

class testApp : 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 windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
void exit();

CloudsFCPParser parser;
CloudsSVGParser svgReader;

};

0 comments on commit 25628a1

Please sign in to comment.