[apps/sequence][apps/graph] Set different graph resolution in sequence

and in function graph

Change-Id: I498e77122a425c233ba536bdde24b9288b2c4513
This commit is contained in:
Émilie Feral
2017-04-14 10:45:39 +02:00
parent 2a9084aab6
commit fe99f740d1
6 changed files with 16 additions and 6 deletions

View File

@@ -51,11 +51,11 @@ bool FunctionGraphController::didChangeRange(InteractiveCurveViewRange * interac
float max = -FLT_MAX;
float xMin = interactiveCurveViewRange->xMin();
float xMax = interactiveCurveViewRange->xMax();
float step = (xMax - xMin)/Ion::Display::Width;
float step = (xMax - xMin)/curveView()->resolution();
for (int i=0; i<functionStore()->numberOfActiveFunctions(); i++) {
Function * f = functionStore()->activeFunctionAtIndex(i);
float y = 0.0f;
for (int i = 0; i <= Ion::Display::Width; i++) {
for (int i = 0; i <= curveView()->resolution(); i++) {
float x = xMin + i*step;
y = f->evaluateAtAbscissa(x, myApp->localContext());
if (!isnan(y) && !isinf(y)) {