void ToolImpl::setTooltipOffset(double val) { if (similar(val, mTooltipOffset)) return; mTooltipOffset = val; emit tooltipOffset(mTooltipOffset); }
void ofxMapaMok::drawLabeledPoint(int label, ofVec2f position, ofColor color, ofColor bg, ofColor fg) { if(!inside(position)) return; glPushAttrib(GL_DEPTH_BUFFER_BIT); glDisable(GL_DEPTH_TEST); ofVec2f tooltipOffset(5, -25); ofSetColor(color); float w = 40; float h = 40; ofSetLineWidth(lineWidth); ofLine(position - ofVec2f(w,0), position + ofVec2f(w,0)); ofLine(position - ofVec2f(0,h), position + ofVec2f(0,h)); ofCircle(position, selectedPointSize); ofxCv::drawHighlightString(ofToString(label), position + tooltipOffset, bg, fg); glPopAttrib(); }