diff --git a/example/src/CrossSource.cpp b/example/src/CrossSource.cpp index 7b216c5..a7b6c4a 100644 --- a/example/src/CrossSource.cpp +++ b/example/src/CrossSource.cpp @@ -8,8 +8,11 @@ CrossSource::CrossSource(){ void CrossSource::draw(){ ofClear(0); ofSetColor(255, 255, 0, 255); - ofRect(0, 0, getWidth(), getHeight()); - + #if (OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR >= 9) || OF_VERSION_MAJOR > 0 + ofDrawRectangle(0, 0, getWidth(), getHeight()); + #else + ofRect(0, 0, getWidth(), getHeight()); + #endif ofSetColor(0, 0, 0, 255); ofSetLineWidth(5); @@ -17,10 +20,17 @@ void CrossSource::draw(){ ofPoint startPoint = ofPoint(10, y); ofPoint endPoint = ofPoint(getWidth() - 10, getHeight() - y); - ofLine(startPoint, endPoint); - + #if (OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR >= 9) || OF_VERSION_MAJOR > 0 + ofDrawLine(startPoint, endPoint); + #else + ofLine(startPoint, endPoint); + #endif float tempY = startPoint.y; startPoint.y = endPoint.y; endPoint.y = tempY; - ofLine(startPoint, endPoint); + #if (OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR >= 9) || OF_VERSION_MAJOR > 0 + ofDrawLine(startPoint, endPoint); + #else + ofLine(startPoint, endPoint); + #endif } \ No newline at end of file diff --git a/example/src/CustomSource.cpp b/example/src/CustomSource.cpp index 7418240..f160dbc 100644 --- a/example/src/CustomSource.cpp +++ b/example/src/CustomSource.cpp @@ -36,7 +36,13 @@ void CustomSource::draw(){ ofClear(0); //ofBackground(0); ofSetColor(255); - for(int i = 0; i < rects.size(); i++){ - ofRect(rects[i]); - } + #if (OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR >= 9) || OF_VERSION_MAJOR > 0 + for(int i = 0; i < rects.size(); i++){ + ofDrawRectangle(rects[i]); + } + #else + for(int i = 0; i < rects.size(); i++){ + ofRect(rects[i]); + } + #endif } \ No newline at end of file