//-------------------------------------------------------------- void ofApp::draw(){ ofSetColor(0); drawDiamond(ofGetWidth()/2, ofGetHeight()/2, 100, mouseY); ofSetColor(255); drawDiamond(mouseX, mouseY, 100, 200); }
void Subdivision::draw(DrawStrategy drawStrategy) { update(); ofSetCircleResolution(*circleResolution); ofEnableSmoothing(); if (generation == 0) { if (drawStrategy == RECTS) { drawRect(); } else if (drawStrategy == DIAMONDS) { drawDiamond(); } else if (drawStrategy == CIRCLES) { drawCircle(); } } else { child1->draw(drawStrategy); child2->draw(drawStrategy); } ofDisableSmoothing(); }
void PeakMarker2D::drawShape(QPainter& painter) const { // draw the symbol switch(m_symbol) { case Circle: drawCircle(painter); break; case Diamond: drawDiamond(painter); break; case Square: drawSquare(painter); break; default: drawCircle(painter); } // calculate label's area on the screen QFontMetrics fm(painter.font()); QRect r = fm.boundingRect(m_label); m_labelRect = QRectF(r); m_labelRect.moveTo(m_boundingRect.x1() + m_markerSize,m_boundingRect.y1() - m_markerSize); }
void flashShape(int shape, WinDrawLine_fn WinDrawLine) { switch(shape){ case 0: drawRectangle(14+5,24+5,50-10,50-10,WinDrawLine); break; case 1: drawTriangle(90+5+5,34+5,70-10-10,WinDrawLine); break; case 2: drawDiamond(14+5,90+5,60-10, WinDrawLine); break; case 3: drawCircle(90+27,90+27,27+27-10,WinDrawLine); break; } }
// will be called with next end as the last begin // match == on begin only, otherwise get double markings void drawKeepEupEScreen(void) { DEBUGBOX("drawKeepEupEScreen",""); clearScreen(); drawRectangleSafe(14,24,50,50); DEBUGBOX("drawKeepEupEScreen","b4rect"); // messes up &WinDrawLineF ptr setup somewhere here drawRectangle(14,24,50,50,&WinDrawLineF); DEBUGBOX("drawKeepEupEScreen",""); drawTriangle(90,34,70,&WinDrawLineF); DEBUGBOX("drawKeepEupEScreen",""); drawDiamond(14,90,60,&WinDrawLineF); DEBUGBOX("drawKeepEupEScreen",""); drawCircle(90+27,90+27,27+27,&WinDrawLineF); DEBUGBOX("drawKeepEupEScreen",""); }