Beispiel #1
0
void ofxUIImageSampler::drawFillHighlight()
{
    if(draw_fill_highlight)
    {
        ofxUISetColor(color_fill_highlight);
        ofxUIDrawLine(rect->getX()+value.x*rect->getWidth(),  rect->getY(), rect->getX()+value.x*rect->getWidth(),  rect->getY()+rect->getHeight());
        ofxUIDrawLine(rect->getX(),  rect->getY()+value.y*rect->getHeight(), rect->getX()+rect->getWidth(),  rect->getY()+value.y*rect->getHeight());
        
        ofxUIFill();
        ofxUISetColor(sampledColor);
        ofxUISetRectMode(OFX_UI_RECTMODE_CENTER);
        ofxUIDrawRect(rect->getX()+value.x*rect->getWidth(), rect->getY()+value.y*rect->getHeight(), squareSize, squareSize);
        ofxUISetRectMode(OFX_UI_RECTMODE_CORNER);
    }
}
Beispiel #2
0
void ofxUIValuePlotter::drawBack()
{
    if(draw_back)
    {
        ofxUIFill();
        ofxUISetColor(color_back);
        rect->draw();
        
        ofxUIDrawLine(rect->getX(), rect->getY()+rect->getHalfHeight(), rect->getX()+rect->getWidth(), rect->getY()+rect->getHalfHeight());
    }
}
Beispiel #3
0
void ofxUIImageSampler::drawFill()
{
    if(draw_fill)
    {
        if(image != NULL)
        {
            ofxUIFill();
            ofxUISetColor(255);
            image->draw(rect->getX(), rect->getY(), rect->width, rect->height);
        }
        ofxUISetColor(color_fill);
        ofxUIDrawLine(rect->getX()+value.x*rect->getWidth(),  rect->getY(), rect->getX()+value.x*rect->getWidth(),  rect->getY()+rect->getHeight());
        ofxUIDrawLine(rect->getX(),  rect->getY()+value.y*rect->getHeight(), rect->getX()+rect->getWidth(),  rect->getY()+value.y*rect->getHeight());
        
        ofxUIFill();
        ofxUISetColor(sampledColor);
        ofxUISetRectMode(OFX_UI_RECTMODE_CENTER);
        ofxUIDrawRect(rect->getX()+value.x*rect->getWidth(), rect->getY()+value.y*rect->getHeight(), squareSize, squareSize);
        ofxUISetRectMode(OFX_UI_RECTMODE_CORNER);
        
    }
}