void WalkupPlayer::draw() { ofSetColor(255,255,255,alpha); if (isAnimatingIn) { drawAnimatingIn(); } else if (isAnimatingOut) { drawAnimatingOut(); } else if (isTransitioning) { drawTransition(); } else { drawNormal(); } }
//-------------------------------------------------------------- void testApp::draw(){ //ofSetHexColor(0x000000); //ofRect(40,40,192,157); ofSetHexColor(0x000000); ofRect(40+36+36,40,48,16); ofSetHexColor(0x000000); ofRect(40+36,40+16,48+36+36,16); ofSetHexColor(0xFFFFFF); if(myStatus.CITY=="hsk") { if(movieLoaded) currentMovie.draw(0,0); } else if(myStatus.CITY=="lvp") { if(movieLoaded) currentMovie.draw(0,0,1360,768); } else if(myStatus.CITY=="mad") { if(movieLoaded) currentMovie.draw(20,72,222,125); } if((currentMovie.getDuration()-currentMovie.getPositionInSeconds())<5){ myStatus.transitionMode=true; //ofLog()<< "transition "<< circlesize; } if(ofGetFrameNum()%25==0){ //ofLog() << ofGetFrameRate() << "\n"; //ofLog() << myStatus.bikeSpeed << "\n"; //ofLog() << currentMovie.getPositionInSeconds() << " of " << currentMovie.getDuration() << " \n "; } if(ofGetFrameNum()%1800 < 400){ drawBanner(ofGetFrameNum()%1800); } if(myStatus.transitionMode==true){ drawTransition(); } ofSetColor(255,255,255,200); if(myStatus.currentCity==MADRID) verdana_small.drawString("madrid", 112,70); else if(myStatus.currentCity==LIVERPOOL) verdana_small.drawString("liverpool", 111,70); else if(myStatus.currentCity==HELSINKI) verdana_small.drawString("helsinki", 109,70); }
void phaseDiagram(){ //set-up stuff gROOT->Macro("init.C"); setStyle(); //draw stuff drawCanvas(); drawTransition(); //also draws critical point drawAxis(); drawLabels(); //draws labels and arrows for phases drawExperiments(); //draws where RCIC, LHC etc. lie on curve drawNormal(); //draws normal matter //save stuff if(iSave){ cPhase->Update(); cPhase->SaveAs("phaseDiagram5.eps"); } }
void StackGraph::draw(float t, float dt) { if(activeNode==0) return; if(gStackGraphDrawBackground) { display.setClearColour(clearcolour); display.clear(); } glColor4f(1.0f, 1.0f, 1.0f, 1.0f); display.mode2D(); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glDisable(GL_TEXTURE_2D); glLineWidth(2.0); glPushMatrix(); glTranslatef(corner.x, corner.y, 0.0f); activeNode->drawContent(dt); //draw scale drawScaleKey(); glDisable(GL_TEXTURE_2D); glColor3fv(border_colour); //border glBegin(GL_LINE_STRIP); glVertex2f(0.0, 0.0); glVertex2f(0.0, height); glVertex2f(width, height); glVertex2f(width, 0.0); glEnd(); //draw section bar vec3f section_colour = vec3f(1.0, 1.0, 1.0); //activeNode->getColour(); vec3f section_colour2 = section_colour * 0.3; glBegin(GL_QUADS); glColor3fv(section_colour); glVertex2f(section_bounds.min.x, section_bounds.min.y); glVertex2f(section_bounds.max.x, section_bounds.min.y); glColor3fv(section_colour2); glVertex2f(section_bounds.max.x, section_bounds.max.y); glVertex2f(section_bounds.min.x, section_bounds.max.y); glEnd(); /* glColor3fv(border_colour); glBegin(GL_LINE_STRIP); glVertex2f(section_bounds.min.x, section_bounds.min.y); glVertex2f(section_bounds.min.x, section_bounds.max.y); glVertex2f(section_bounds.max.x, section_bounds.max.y); glVertex2f(section_bounds.max.x, section_bounds.min.y); glEnd(); */ //transition bar if(in_transition > 0.0) { drawTransition(dt); } if(mouseOverNode != 0 && in_transition <= 0.0) { mouseOverNode->drawBarToolTip(1.0); } activeNode->drawChildToolTips(); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_TEXTURE_2D); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); //section title std::string section_title = activeNode->getTitle(); int title_width = titlefont.getWidth(section_title); int title_height = titlefont.getHeight(); titlefont.print(section_bounds.min.x + width*0.5 - title_width*0.5, section_bounds.min.y + section_bounds.height()*0.5 - title_height*0.5, "%s", section_title.c_str()); //time //drawTime(); // UI glPopMatrix(); display.mode2D(); std::string max_dollar_value = dollarAmount(scale_factor); if(debug) { keyfont.print(0,0, "FPS: %.2f", fps); keyfont.print(0,20, "Scale Factor: %.2f - %s (%.2f)", scale_factor, max_dollar_value.c_str(), current_scale_factor); } // ftglfont->Render("Hello World"); glDisable(GL_TEXTURE_2D); }