summaryrefslogtreecommitdiff
path: root/gui/src/chainImage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/chainImage.cpp')
-rw-r--r--gui/src/chainImage.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/gui/src/chainImage.cpp b/gui/src/chainImage.cpp
index 6fdca96..a9ef602 100644
--- a/gui/src/chainImage.cpp
+++ b/gui/src/chainImage.cpp
@@ -221,13 +221,11 @@ void chainImageSet::drawOutput(){
}
-void chainImageSet::drawGui(int x,int y){
+void chainImageSet::drawGui(int x,int y,bool is_selected){
float t_xoffs=0.0;
float borderwidth=THUMB_SIZE*0.1; //ofGetWindowHeight()*(1.0-THUMB_BORDER_RATIO)*0.5;
- glPushMatrix();
-
/*
@@ -238,6 +236,10 @@ void chainImageSet::drawGui(int x,int y){
//draw each image, outlined
+ glPushMatrix();
+
+ glTranslatef(x,y,0);
+
for(std::list<chainImage>::iterator ii=images.begin(); ii != images.end(); ii++){
ofSetColor(255,255,255);
@@ -246,9 +248,7 @@ void chainImageSet::drawGui(int x,int y){
float thumby=ii->thumbnail.getHeight()/2;
float thumbscale=ii->thumbnail.getWidth()/ii->getWidth();
- glPushMatrix();
-
- glTranslatef(x,y,0);
+
//why do I have to set this every time??
ii->thumbnail.setAnchorPercent(0.5,0.5);
@@ -333,6 +333,8 @@ void chainImageSet::drawGui(int x,int y){
ofDrawLine(p3,p4);
ofDrawLine(p4,p1);
+
+
glPopMatrix();
}
@@ -340,8 +342,22 @@ void chainImageSet::drawGui(int x,int y){
t_xoffs+=ii->thumbnail.getWidth()+(borderwidth*2);
- glPopMatrix();
+
+ }
+
+ if (is_selected) {
+ ofSetColor(0,0,255);
+ ofPolyline box;
+ box.addVertex(ofPoint(5,5));
+ box.addVertex(ofPoint(t_xoffs-5,5));
+ box.addVertex(ofPoint(t_xoffs-5,(THUMB_SIZE/THUMB_BORDER_RATIO)-10));
+ box.addVertex(ofPoint(5,(THUMB_SIZE/THUMB_BORDER_RATIO)-10));
+ box.addVertex(ofPoint(5,5));
+ box.draw();
}
+
+
+ glPopMatrix();
}