Gabriel Ozouf
95fef86ec0
[apps/graph] Activated caching for graph drawing
...
Added a default argument to CurveView::drawCurve : a function to initiate the
memoization of continuous functions. The function is implemented in
ContinuousFunctionCache and provided by GraphView. This should be invisible
to other types of curves that rely on CurveView::drawCurve.
Change-Id: I59aa55d67154b6d4bf9614b7ed87c48408773d86
2020-11-04 15:00:43 +01:00
Gabriel Ozouf
c71b2dee99
[curve_view] Factor bounding box code for joinDots
...
Change-Id: Iae974aa2bee12e6c56bad84fd3b45093fb2a856f
2020-10-23 08:56:56 +02:00
Gabriel Ozouf
26fdfcd25c
[curve_view] Fixed variable names
...
Change-Id: I8aad13c6bce719ba8f3a30cd86f06f7c89ec041e
2020-10-23 08:56:56 +02:00
Gabriel Ozouf
fe8e490ac0
[curve_view] Filter unwanted vertical asymptotes
...
Change-Id: Ia603a2fb1553b6dfc038d2a28472ce48e41936db
2020-10-23 08:56:56 +02:00
Gabriel Ozouf
106916e7bf
[curve_view] Add double evaluation
...
Add the possibility to use a double-typed evaluator when tracing a
curve, useful when errors caused by float approximation mess with the
drawing.
Change-Id: I3ab410deec4823149239b0a26b1885fd2a493226
2020-10-23 08:56:56 +02:00
Émilie Feral
c91c2a6e3f
[app/shared] CurveView: Avoid dashSize overflow in
...
drawHorizontalOrVerticalSegment
2020-10-12 09:48:55 +02:00
Émilie Feral
8e025b0823
[apps/shared] CurveView: avoid overflowing KDCoordinate
...
This fixes the following bug: add the sequence, u(n)=2^n. On the graph,
go to "sum of terms" and try to sum terms from 0 to 18 by moving the
cursor. It hangs.
2020-10-12 09:48:55 +02:00
Léa Saviot
72e342e1b1
[apps/curve_view] Fix drawArrow
...
Compute everything in pixels + fix glitch when zooming on the tip of
arrow(0,0,2,3)
2020-06-04 14:58:20 +02:00
Émilie Feral
420dd04766
[apps/shared][python/port] CurveView::drawArrow uses pixel computation
...
instead of float computation to avoid precision errors, by default the
arrow size is decided in pixels.
2020-06-04 14:50:10 +02:00
Émilie Feral
c826c53659
[apps/shared] CurveView: change drawArrow API to take arrow shape
...
arguments in float instead of coordinates
2020-06-04 14:50:09 +02:00
Émilie Feral
e92b56b78e
[apps/shared] CurveView: change drawArrow arguments (new definition of
...
arrow shape)
2020-06-04 14:50:09 +02:00
Romain Goyet
84768472bd
Explicit std::min/max template usage
...
This is unfortunately required in several cases:
- Sometimes when we use either float and double (this should be changed)
- Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
- Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0
Use std::min and std::max
2020-04-14 09:31:02 -04:00
Émilie Feral
633776b92f
[apps/shared] Fix CurveView::drawArrow on arrow without orientation
2020-04-01 11:46:25 +02:00
Émilie Feral
9e822e85e5
[apps/shared] CurveView: implement drawArrow
2020-04-01 10:18:08 +02:00
Émilie Feral
aaf71328ba
[apps/shared] CurveView: resolve name conflict -
...
drawHorizontalOrVerticalSegment & drawSegment -
2020-04-01 10:18:08 +02:00
Romain Goyet
a3b1b51f75
[pyton/matplotlib] Support plot
2020-04-01 10:18:08 +02:00
Léa Saviot
bd0b9f8a4a
[apps/curve_view] Fix typo
...
The labels would not float on the right of the display
2020-03-31 15:16:39 +02:00
Neven Sajko
aae5e49c01
Remove useless uses of const for return types
...
An integer or float value can not be assigned to, so there is no point
in qualifying it as const.
2020-03-02 09:48:23 +01:00
Émilie Feral
d61336936e
[apps/shared] Create a class Dots to share dots masks between CurveView
...
and RoundCursorView. Use the same dot for illustrations of additional
results in Calculation app and Function app
2020-02-12 15:13:21 +01:00
Émilie Feral
06fa3bba5b
[apps/shared][apps/calculation] CurveView: enable to personalize the
...
maximal glyph length of graduation labels. Shorten them in
ComplexGraphView
2020-02-12 15:13:21 +01:00
Émilie Feral
21f3cd629d
[apps/shared] CurveView: fix drawLabelsAndGraduations
...
Fix following bug: when handling label = "0", not shifted,
the label position should be computed as for the other labels.
2020-02-12 15:13:21 +01:00
Émilie Feral
c6e54f90c3
[apps/shared] CurveView: fix confusion between after/before relative
...
position in drawLabel
2020-02-12 15:13:20 +01:00
Émilie Feral
800adce876
[apps/shared] CurveView: change API; drawLabel can draw a label at a
...
position and the relative position of the label (above, below, to the
left or right of the graduation) can be chosen. 'positionLabel' is a
private method used by 'drawLabelsAndGraduations' and 'drawLabel' to
determine the position of the label knowing the position of the
graudation and its relative position
2020-02-12 15:13:20 +01:00
Émilie Feral
17bc808257
[apps/shared] CurveView: fix drawLabelsAndGraduations when
...
graduationOnly is on: the graduation are not drawn only when outside of
the drawn rect
2020-02-12 15:13:20 +01:00
Émilie Feral
95137909c6
[apps/shared] CurveView: fixes drawLabelsAndGraduations when the 'fixCoordinate' parameter is true.
...
This fixes the graduation drawing of the box view in the statistics app
2020-02-12 15:13:20 +01:00
Émilie Feral
29bab70dcd
[apps/shared] CurveView: add a parameter "color" to drawLabel
2020-02-12 15:13:20 +01:00
Émilie Feral
dfd4811136
[apps/shared] CurveView: change API to expose 'drawLabel' and
...
'drawLabelsAndGraduations'
2020-02-12 15:13:20 +01:00
Émilie Feral
98c6f4ba47
[apps/shared] CurveView: factorize code of drawLine and drawSegment
2020-02-12 15:13:20 +01:00
Émilie Feral
818067e03b
[apps/shared] CurveView: add a parameter to drawSegment to draw dashed
...
segment
2020-02-12 15:13:20 +01:00
Émilie Feral
b47ded4074
[apps/calculation] Add a parameter in Shared::CurveView to choose the
...
curve thickness
2020-02-12 15:13:20 +01:00
Émilie Feral
bf07b5ab76
[apps/shared] CurveView: fix typo
2020-02-12 15:13:20 +01:00
Émilie Feral
f7942207f5
[apps/shared][apps/calculation] Create a methods
...
Shared::CurveView::drawAxisLabel and use it in ComplexGraphView
2020-02-12 15:13:18 +01:00
Émilie Feral
9c3dd84c42
[apps/shared] CurveView: factorize code of drawLabels and drawLabel
2020-02-12 15:13:18 +01:00
Émilie Feral
0beceede5f
[apps/shared][apps/calculation] Create CurveView::drawLabel and use it
...
in complex_graph_view
2020-02-12 15:13:18 +01:00
Léa Saviot
9f018eb9d9
[escher/view] setFrame and layoutSubviews can be forced
2020-02-12 15:13:15 +01:00
Léa Saviot
0055a59c75
[apps/banner_view] Fix minimalSizeForOptimalDisplay
...
Should not use m_frame as it may not be set properly. By default, a
banner view wants to take the whole screen width
This fixes the following scenario :
Draw the polar curve r=12. When navigating from the tab to the graph,
the curve was visibly redrawn because the banner view height was not
computed properly.
2020-02-12 15:13:15 +01:00
Émilie Feral
f6cfcab4e5
[apps/shared] CurveView: add an assertion on the number of labels to
...
avoid reading out of bound memory
2019-10-18 14:32:57 +02:00
Émilie Feral
4d593a6149
[poincare] PrintFloat: take into account the distinction between char
...
and glyph length in ConvertFloatToText
2019-09-26 11:26:48 +02:00
Émilie Feral
22dc20530f
[apps/shared] CurveView: jointDots does stamp the first dot and the
...
closest dot to an undefined dot. It avoids recursing when both dots are
undefined.
2019-09-18 10:44:30 +02:00
Ruben Dashyan
7f8cc4d147
[apps/shared/curve_view] Fix drawCurve on boundaries
2019-09-17 18:17:09 +02:00
Léa Saviot
e67160b878
[apps/graph] Faster cursor scrolling on device
...
This commit is quite dirty but works well
2019-09-09 16:56:32 +02:00
Léa Saviot
67964ca383
[apps/curve_view] Fix the drawing
...
Scenario: exponential distribution, lambda = 1.23E-38
2019-09-09 11:25:20 +02:00
Émilie Feral
2ca8290813
[apps/shared] CurveView: number of pixels per label cannot be negative
2019-09-06 16:12:06 +02:00
Ruben Dashyan
f579010340
[apps/shared/curve_view] Correct parameter's value near domain boundaries
2019-09-05 17:36:00 +02:00
Ruben Dashyan
e2543fcef4
[apps/shared/curve_view] drawCurve computes parameter t more precisely
2019-09-05 17:36:00 +02:00
Léa Saviot
62793f41e0
[apps/curve_view] Fix drawing t limit
...
rho = 4 was not drawn properly (last quarted missing because t == tEnd)
2019-09-02 11:23:50 +02:00
Léa Saviot
850170e33b
[apps/shared] computeYRange clips tMin..tMax to xMin..xMax if possible
2019-08-30 10:18:39 +02:00
Léa Saviot
24d1594255
[apps] Draw curves according to their definition domain
2019-08-29 11:07:22 +02:00
Léa Saviot
c71ef7ff79
[apps/graph] Evaluation methods renaming
2019-08-29 11:07:22 +02:00