summaryrefslogtreecommitdiff
path: root/gui/src
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2018-08-29 00:44:50 +0100
committerTim Redfern <tim@getdrop.com>2018-08-29 00:44:50 +0100
commit25873b7bd177c6bb4ad4b00a51eb8fa213468126 (patch)
tree45f8e4f284b8ef3a886d83a58418d2c8d5f7c563 /gui/src
parentc0e32ef7278e108614186ff51f8e4260313a0e9e (diff)
zoom multiplier
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/chainImageSet.cpp14
-rw-r--r--gui/src/chainImageSet.h2
-rw-r--r--gui/src/ofApp.cpp6
3 files changed, 19 insertions, 3 deletions
diff --git a/gui/src/chainImageSet.cpp b/gui/src/chainImageSet.cpp
index d3d363f..461df7e 100644
--- a/gui/src/chainImageSet.cpp
+++ b/gui/src/chainImageSet.cpp
@@ -25,6 +25,15 @@ void chainImageSet::drawOutput(){
glLoadIdentity();
glOrtho(-ofGetWidth()/2, ofGetWidth()/2, ofGetHeight()/2, -ofGetHeight()/2, 0.0f, 5000.0f);
*/
+
+ /*
+ //we can set the clipping but why is it squashed in X & Y?
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ float near=1.0f;
+ float far=10000.0f;
+ glFrustum(-1.0, 1.0, -1.0, 1.0, near, far);
+ */
glMatrixMode ( GL_MODELVIEW );
glLoadIdentity ( );
/* is not what we want
@@ -39,6 +48,8 @@ void chainImageSet::drawOutput(){
*/
glScalef(ZOOM_FUDGE_FACTOR,ZOOM_FUDGE_FACTOR,ZOOM_FUDGE_FACTOR); //easy way to limit camera cutoff
+
+
//printf("drawing rotation %f for transition %f\n",(*currentImage)->getRotation(),(*currentImage)->transition);
float rot=(*currentImage)->getRotation();
@@ -514,7 +525,8 @@ void chainImageSet::mousePressed(int x, int y, int button){
(*currentImage)->updateOutput(decayFactor);
}
}
- else clickPoint=ofPoint(x,y);
+ //else
+ clickPoint=ofPoint(x,y);
}
//--------------------------------------------------------------
diff --git a/gui/src/chainImageSet.h b/gui/src/chainImageSet.h
index 58734be..cc7550a 100644
--- a/gui/src/chainImageSet.h
+++ b/gui/src/chainImageSet.h
@@ -4,7 +4,7 @@
#include "threadedChainImageLoader.h"
#include "threadedSystemDialogs.h"
-#define ZOOM_FUDGE_FACTOR 5
+#define ZOOM_FUDGE_FACTOR 1
class chainImageSet{
diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp
index 08a77a8..706ff14 100644
--- a/gui/src/ofApp.cpp
+++ b/gui/src/ofApp.cpp
@@ -264,7 +264,9 @@ void ofApp::newMidiMessage(ofxMidiMessage& msg) {
//sets[i].zoomMultiplier=1.0f+(((float)msg.value-64)/64.0f); doesn't work
};
- printf("Val %i, zoomMultiplier: %f \n",msg.value,sets[0].fitFactor);
+ sets[selected_set].zoomMultiplier=1.0f+(((float)msg.value-64)/64.0f);
+
+ printf("Val %i, zoomMultiplier: %f \n",sets[selected_set].zoomMultiplier);
}
if (msg.channel==1&&msg.control==65+offet){
//top button 1
@@ -341,6 +343,7 @@ void ofApp::mouseDragged(int x, int y, int button){
void ofApp::guiMouseDragged(ofMouseEventArgs &args){
sets[selected_set].mouseDragged(args.x,args.y,args.button);
+ //ofLog()<<">>DRAGGED "<<args.x<<" "<<args.y;
}
//--------------------------------------------------------------
@@ -348,6 +351,7 @@ void ofApp::mousePressed(int x, int y, int button){
}
void ofApp::guiMousePressed(ofMouseEventArgs &args){
+ //ofLog()<<">>PRESSED "<<args.x<<" "<<args.y;
if (commandPressed){
if (args.y<200){
sets[0].mousePressed(args.x,args.y,OF_MOUSE_BUTTON_4);