summaryrefslogtreecommitdiff
path: root/gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/chainImage.cpp5
-rw-r--r--gui/src/chainImage.h4
-rw-r--r--gui/src/chainImageSet.cpp26
3 files changed, 33 insertions, 2 deletions
diff --git a/gui/src/chainImage.cpp b/gui/src/chainImage.cpp
index 1f130ae..5a24c7b 100644
--- a/gui/src/chainImage.cpp
+++ b/gui/src/chainImage.cpp
@@ -81,6 +81,11 @@ void chainImage::gpu_drawImage(){
*/
}
+//rotation could be a lot smoother
+//atm we only do horizontal rotation splines
+//movement is a bit jerky
+//could it be possible to visualise the path?
+
void chainImage::updateRotationTimeline(){
rotationTimeline.clear();
diff --git a/gui/src/chainImage.h b/gui/src/chainImage.h
index 1dbb808..1ac234c 100644
--- a/gui/src/chainImage.h
+++ b/gui/src/chainImage.h
@@ -6,8 +6,8 @@
#define THUMB_BORDER_RATIO 0.8
#define THUMB_SIZE 160
#define DEFAULT_FADEIN 1.0
-#define BEZIER_OUT 0.25
-#define BEZIER_IN 0.25
+#define BEZIER_OUT 0.125
+#define BEZIER_IN 0.125
#define ROTATION_BEZIER_FRACTION 0.1
#define SWITCH_NONE 0
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);