From b036871dd531cb3adc8ff744d2e4804efbccc0e6 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 31 May 2018 19:23:49 +0100 Subject: xform working in audioplot --- gui/src/AudioPlotter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gui/src/AudioPlotter.cpp') diff --git a/gui/src/AudioPlotter.cpp b/gui/src/AudioPlotter.cpp index dba6765..e78e8ba 100644 --- a/gui/src/AudioPlotter.cpp +++ b/gui/src/AudioPlotter.cpp @@ -12,15 +12,17 @@ colourPolyline Audioplotter::compute_chaos(colourPolyline& poly,float colourFade } return tempPoly; } -vector Audioplotter::output(float scale,float decay){ +vector Audioplotter::output(float plotscale,float plotdecay){ ofMatrix4x4 x = ofMatrix4x4::newIdentityMatrix(); x.translate((-ofGetWidth()/2)+((ofVec2f)translate).x,(-ofGetHeight()/2)+((ofVec2f)translate).y,0); x.rotate(rotate,0,0,1); - //x.scale(((ofVec2f)scale).x,((ofVec2f)scale).y,1.0f); + + x.scale(((ofVec2f)scale).x,((ofVec2f)scale).y,1.0f); + x.translate((ofGetWidth()/2),(ofGetHeight()/2),0); //destructive or non? - float fadefactor=decay<0.0f?1.0f-(1.0f/history_size):decay; + float fadefactor=plotdecay<0.0f?1.0f-(1.0f/history_size):plotdecay; vector outdata; -- cgit v1.2.3