void ofxUIEnvelopeEditor::drawEnvelope(){ vector<ofVec3f> points = envelope->getPoints(); int size = points.size(); float rX = rect->getX(); float rY = rect->getY(); ofxUISetRectMode(OFX_UI_RECTMODE_CENTER); ofxUINoFill(); for (int i = 0; i < size; i++) { float x = rX + points[i].x*rect->getWidth(); float y = rY + points[i].y*rect->getHeight(); ofxUICircle(x, y, pointNodeRadius); if(i < size-1) { float nx = rX + points[i+1].x*rect->getWidth(); float hx = (x + nx)/2.0; ofxUIDrawRect(hx, rY + envelope->getY((hx-rX)/rect->getWidth())*rect->getHeight(), pointNodeRectWidth, pointNodeRectHeight); } } ofxUIFill(); ofxUISetRectMode(OFX_UI_RECTMODE_CORNER); polyline.draw(); }
void ofxUICircleSlider::drawFill() { if(draw_fill) { ofxUIFill(); ofxUISetColor(color_fill); ofxUICircle(rect->getX()+rect->getHalfWidth(), rect->getY()+rect->getHalfHeight(), value*rect->getHalfWidth()); } }
void ofxUICircleSlider::drawOutline() { if(draw_outline) { ofNoFill(); ofxUISetColor(color_outline); ofxUICircle(rect->getX()+rect->getHalfWidth(), rect->getY()+rect->getHalfHeight(), rect->getHalfWidth()); } }
void ofxUICircleSlider::drawBack() { if(draw_back) { ofxUIFill(); ofxUISetColor(color_back); ofxUICircle(rect->getX()+rect->getHalfWidth(), rect->getY()+rect->getHalfHeight(), rect->getHalfWidth()); } }
void ofxUICircleSlider::drawFillHighlight() { if(draw_fill_highlight) { ofxUIFill(); ofxUISetColor(color_fill_highlight); ofxUICircle(rect->getX()+rect->getHalfWidth(), rect->getY()+rect->getHalfHeight(), value*rect->getHalfWidth()); ofxUISetColor(label->getColorFillHighlight()); label->drawString(rect->getX()+rect->getWidth()+padding, label->getRect()->getHeight()/2.0+rect->getY()+rect->getHeight()-rect->getHeight()*.5, ofxUIToString(getScaledValue(),labelPrecision)); } }