summaryrefslogtreecommitdiff
path: root/gui/src/AudioPlotter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/AudioPlotter.cpp')
-rw-r--r--gui/src/AudioPlotter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/src/AudioPlotter.cpp b/gui/src/AudioPlotter.cpp
index 22eb757..a4ea5f3 100644
--- a/gui/src/AudioPlotter.cpp
+++ b/gui/src/AudioPlotter.cpp
@@ -21,6 +21,12 @@ vector <colourPolyline> Audioplotter::output(float plotscale,float plotdecay){
x.scale(((ofVec2f)scale).x,((ofVec2f)scale).y,1.0f);
x.translate((ofGetWidth()/2),(ofGetHeight()/2),0);
+
+
+ ofMatrix4x4 flip = ofMatrix4x4::newIdentityMatrix();
+ flip.translate((-ofGetWidth()/2),(-ofGetHeight()/2),0);
+ flip.scale(-1.0f,1.0f,1.0f);
+ flip.translate((ofGetWidth()/2),(ofGetHeight()/2),0);
//destructive or non?
float fadefactor=plotdecay<0.0f?1.0f-(1.0f/history_size):plotdecay;
@@ -41,8 +47,14 @@ vector <colourPolyline> Audioplotter::output(float plotscale,float plotdecay){
//ofLog() << "set colour to "<<col;
newdata.push_back(line);
outdata.push_back(line);
+
}
data[i]=newdata;
+ if (mirror){
+ for (int j=0;j<data[i].size();j++){
+ outdata.push_back(lineTransformer::polyLineTransform(flip,data[i][j]));
+ }
+ }
}
return outdata;
}