void Spring :: display(Bob nameBob)
{
	ofRectMode(CENTER);
	ofSetLineWidth(3);
	ofSetColor(30,150,180);
	//ofLine(Origin.x,Origin.y,Origin.x,Origin.y+restlength);
	ofLine(nameBob.Location.x,nameBob.Location.y,Origin.x,Origin.y);
}
Пример #2
0
void Splat::draw() {
	ofPushMatrix();
	ofSetColor( 255, trans );
	ofTranslate( pos );
	//ofRotate( rotation * -3);
	ofScale( 0.25, 0.25, 0.25);
	ofRectMode( OF_RECTMODE_CENTER );
	img->draw( 0, 0 );
	ofPopMatrix();
}
//--------------------------------------------------------------
void ofApp::setup(){
    ofSetBackgroundAuto(false);
    bool hasDrawn = false;
    ofRectMode(RECT_MODE_CENTER);
    season = 0;
    /*
     0 = SUMMER
     1 = FALL
     2 = WINTER
     3 = SPRING
     
     */
    
    
}
//--------------------------------------------------------------
void ofApp::setup(){
    ofSetBackgroundAuto(false);
    bool hasDrawn = false;
    ofRectMode(RECT_MODE_CENTER);
    season = 0;
    /*
     0 = SUMMER
     1 = FALL
     2 = WINTER
     3 = SPRING
     
     */

    
    /*myBranch.setup(;, <#float _yPos#>, <#float _width#>, <#float _length#>, <#float _splitPercentage#>, <#int _maxSubdivisions#>, <#int _maxSegments#>, <#int _segmentsSinceStart#>, <#float _angle#>, <#float _curvature#>, <#ofColor _color#>);*/
    
    
}
Пример #5
0
//--------------------------------------------------------------
void testApp::draw(){
    
    v.draw();
    
    
    if(toggle){
        
        ofSetColor(175);
        ofNoFill();
        ofRectMode(CENTER);
        ofRect(d, d, ofGetWidth()-d*2, ofGetHeight()-d*2);
    
    }
    
    
    else{
        ofSetColor(175);
        ofNoFill();
        ofCircle(circlePosition, circleRadius);
    }
    
}
Пример #6
0
void Menu::drawMenuItems() {

    ofPushMatrix();
    ofTranslate(mTopLeft);
//   cout << angle << endl;

    ofRotateZ(ofRadToDeg(angle));
    ofFill();

    itemHeight = windowHeight/mMenuItems.size() - (mMenuItems.size()+1)*MARGIN;
    for(int i = 0; i < mMenuItems.size(); i++)
    {
        ofSetColor(255,0,0,127);
        ofSetDrawBitmapMode(OF_BITMAPMODE_MODEL);
        ofRectMode(OF_RECTMODE_CORNER);
        ofRect(MARGIN*scale, (i+1)*MARGIN*scale + i*itemHeight, windowWidth - 2*MARGIN, itemHeight);
        ofSetColor(255,255,255, 255);
        mFont.loadFont("verdana.ttf", mFontSize*scale);
        mFont.drawString(mMenuItems[i]->mLabel, MARGIN*scale + TEXT_MARGIN, (i+1)*MARGIN*scale + i*itemHeight + 8*TEXT_MARGIN);
    }
    ofPopMatrix();
}
Пример #7
0
//--------------------------------------------------------------
void MovingObjects::drawRectangles(){

    
    ofEnableAlphaBlending();
    
    ofPushMatrix();
    
    ofPushStyle();
    
    ofSetColor(colorRect);
    
    for (int i=0; i<12; i++) {
        ofRectMode(OF_CENTER);
        ofDrawRectangle( hFrames[i].getPointAtPercent((hMovingXPos[i]+1) * 0.5), 7, 7 );
    }

    ofPopStyle();

    ofPopMatrix();
    
    ofDisableAlphaBlending();
    

}