This method of InteractiveCurveViewRangeDelegate was only used to
compute the Y range when Yauto was on.
Change-Id: I9b688a87e16fc58c7d2b00eb071076b98f945df6
The graph range used to be reset to default whenever all functions were
modified. As we no longer want to reset the range without the user's
input, we do not need to track whether the functions changed at all.
/!\ As of this commit, there is no longer a way to restore the default
zoom, until a new automatic zoom button is added.
Change-Id: Ie74e8fd61e13055fa6ce2b2d1e883182d4ecffce
The new zoom implemented for ContinuousFunction is now factorized inside
Function to benefit the Sequence class. The same things is done to code
added to Graph::GraphController, which is moved into
FunctionGraphController.
This removes the reimplementation of several methods, most notably
computeYRange, as the implementation for function is general enough to
work on sequences.
Change-Id: I9b8211354064f46c3fa3dde3191dcb39d627a1d2
Initial zoom for displaying curves is computed according to the
following rules :
- For polar and parametric curves, the algorithm has not changed.
Vertical and horizontal ranges are chosen in order to display the
full curve with orthonormal graduations.
- For cartesian curves, the horizontal range is chosen in order to
display all points of interest (roots, extrema, asymptotes...).
The vertical range is fitted to be able to display those points, but
also cuts out points outside of the function's order of magnitude.
Change-Id: Idf8233fc2e6586b85d34c4da152c83e75513d85c
We memoize the checksum of the x first models, and we check that one of
these models is still present when the graph view appears. If so, we do
not reload the range, other wise we reload it.
Scenario:
f(t) = [t^2 t+1] in parametric
Display the graph
f(x) = 1 on ]-inf;0]
g(x) = 2 on [0;inf[
Display the graph -> the range did not change
It was a pure virtual method implemented in derived classes
Shared::FunctionGraphController,
Regression::GraphController.
InteractiveCurveViewRange does not need anymore to hold CurveViewCursor
* m_cursor.
cursorBottomMarginRatio(), displayBottomMarginRatio(),
estimatedBannerHeight() and k_viewHeight moved to
Shared::InteractiveCurveViewController from derived classes.
estimatedBannerNumberOfLines() moved from
Shared::FunctionGraphController to
Shared::InteractiveCurveViewController and implemented in
Regresssion::GraphController.
It was implemented by the Graph and Sequence GraphController derived
classes and was used
1) in FunctionGraphController::viewWillAppear to set the cursorView
specific to each derived class,
2) in FunctionGraphController::cursor/displayBottomMarginRatio()
methods.
Instead
1) the viewWillAppear method of each derived classes sets its
cursorView itself
2) one may already get the cursorView through curveView().