Skip to content

Instantly share code, notes, and snippets.

@roxlu

roxlu/test.cpp Secret

Created July 7, 2011 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roxlu/417b767770e524f11add to your computer and use it in GitHub Desktop.
Save roxlu/417b767770e524f11add to your computer and use it in GitHub Desktop.
Test render, no color set
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofBackground(33,33,33);
to_pdf = false;
}
//--------------------------------------------------------------
void testApp::update(){
}
//--------------------------------------------------------------
void testApp::draw(){
if(to_pdf) {
ofBeginSaveScreenAsPDF("render.pdf");
}
ofCircle(ofGetWidth()*0.5,ofGetHeight()*0.5,10);
if(to_pdf) {
ofEndSaveScreenAsPDF();
to_pdf = !to_pdf;
}
}
//ofSetColor(0xFF, 0xFF, 0xFF);
//--------------------------------------------------------------
void testApp::keyPressed(int key){
if(key == 'p') {
to_pdf = !to_pdf;
}
}
//--------------------------------------------------------------
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){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment