Exemplo n.º 1
0
//--------------------------------------------------------------
void saverScene::draw(){
	ofPushStyle();	

	ofFill();
	
	ofSetHexColor(0xFFFFFF);
	ofRect(SIDE_GUI_X, 0, ofGetWidth(), ofGetHeight());
	
	if( tmpGroups.size() ){
		ofPushStyle();
		ofEnableAlphaBlending();
		addTag.draw(50);
		clearLoaded.draw(50);
		ofPopStyle();
		
	}
	

	renderer.render(groups.getVector());
	renderer.render(tmpGroups);
	
	
	if( grabScreen ){
		ofImage img;
		img.grabScreen(SIDE_GUI_X, 0, ofGetWidth()-SIDE_GUI_X, ofGetHeight());
		img.saveImage(imagePath + imageFilename);
		
		if( !uploadImage(imagePath, imageFilename) ){
			printf("ERROR UPLOADING VIA FTP\n");
		}		
		
		grabScreen = false;
	}

	saveAndUpload.draw();
	clearTags.draw();
	loadPrevious.draw();
	loadNext.draw();
	
			
	if( mx < SIDE_GUI_X ){
		ofPushStyle();
			ofFill();
			ofSetColor(255, 255, 255);
			ofCircle(mx, my, 9);
			ofSetColor(0,0,0);
			ofCircle(mx, my, 6);
		ofPopStyle();
	}
	else{
		ofNoFill();
		ofCircle(mx, my, 9);
	}
	
	
	ofPopStyle();
}
Exemplo n.º 2
0
//--------------------------------------------------------------
void styleScene::draw() {
    ofPushStyle();

    for(int i = 0; i < drawableButtons.size(); i++) {
        drawableButtons[i]->draw();
    }

    if( groups.size() ) {
        renderer.render(groups.getVector());
        ofPushStyle();
        ofSetLineWidth(1);
        glLineStipple(1, 0x3F07 );
        glEnable( GL_LINE_STIPPLE );
        for(int i = 0; i < groups.size(); i++) {
            if( i == whichGroup || showAll) {
                ofSetColor(160, 160, 160);
                groups[i].drawBoundingRect();
            }
        }
        glDisable(GL_LINE_STIPPLE);
        ofPopStyle();
    }

    ofEnableAlphaBlending();
    if( state == STYLE_LETTER ) {
        selectLeft.draw(50.0);
        selectRight.draw(50.0);
    } else if (state == STYLE_STROKE) {
        strokeUp.draw(50.0);
        strokeDown.draw(50.0);
        pickColor.draw(50.0);
        brush.draw(50.0);
    } else if (state == STYLE_SHADOW) {
        shadowLeft.draw(50.0);
        shadowRight.draw(50.0);
        shadowUp.draw(50.0);
        shadowDown.draw(50.0);
        pickColor.draw(50.0);
        lighting.draw(50.0);
        hashes.draw(50.0);
    } else if (state == STYLE_FILL) {
        toggleFill.draw(75.0);
        toggleHoles.draw(75.0);
        pickColor.draw(50.0);
    } else if (state == STYLE_OUTLINE) {
        outlineUp.draw(50.0);
        outlineDown.draw(50.0);
        pickColor.draw(50.0);
    }

    if (drawColors) {
        ofPushStyle();
        cPicker.draw(pickColor.x + pickColor.width - 6*cPicker.width, pickColor.y+100);
        ofPopStyle();
    }


    if( mx < SIDE_GUI_X ) {
        ofPushStyle();
        ofFill();
        ofSetColor(255, 255, 255);
        ofCircle(mx, my, 9);
        ofSetColor(0,0,0);
        ofCircle(mx, my, 6);
        ofPopStyle();
    }
    else if( testState == BUTTON_NONE ) {
        ofSetColor(0, 0, 0);
        ofNoFill();
        ofCircle(mx, my, 9);
    } else if(testState == BUTTON_STARTED ) {
        ofFill();
        ofCircle(mx, my, 5);
    }

    ofPopStyle();
}