From 75094cedeb1910d8a7cdb86ac56617af25f21a54 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 14 Dec 2017 20:33:31 +0000 Subject: correct path drawing --- gui/src/chainImageSet.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gui/src/chainImageSet.cpp') diff --git a/gui/src/chainImageSet.cpp b/gui/src/chainImageSet.cpp index 751b1ba..8f73013 100644 --- a/gui/src/chainImageSet.cpp +++ b/gui/src/chainImageSet.cpp @@ -195,6 +195,32 @@ void chainImageSet::drawGui(int x,int y,bool is_selected){ } + glPushMatrix(); + + ofSetColor(255,0,255); + + glTranslatef(t_xoffs+borderwidth+thumbx,borderwidth+thumby,0); + //this gets us to the middle of the image + + ofDrawRectangle(-5,-5,10,10); + + ofSetLineWidth(5); + + float pathscale=thumbscale/(((*ii)->linked)->linkScale); + + //draw the path here + glScalef(pathscale,pathscale,pathscale); + + //path starts at the linkpos and goes to the link's linkpos + //could it equally go from this point? + ((*ii)->linked)->updateOutput(decayFactor); + ofPoint start=((*ii)->linked)->path.getPointAtLength(0.0f); + glTranslatef(-start.x,-start.y,0); + ((*ii)->linked)->path.draw(); + + ofSetLineWidth(1); + + glPopMatrix(); t_xoffs+=(*ii)->thumbnail.getWidth()+(borderwidth*2); -- cgit v1.2.3