diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-06-02 10:39:32 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-06-02 10:39:32 +0100 |
| commit | a730ef3ebd758b610b2fc5bad5d645040584f14f (patch) | |
| tree | e20e50187d645a226d5615feaf46dacfb5fb395f /gui/src/AudioPlotter.cpp | |
| parent | 86475494161cde9a2eddcedb3fe7baa9b48f96d4 (diff) | |
passades show
Diffstat (limited to 'gui/src/AudioPlotter.cpp')
| -rw-r--r-- | gui/src/AudioPlotter.cpp | 12 |
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; } |
