mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Graph: avoid reloading when highlighting the area under curve
(which does change in the Graph app)
This commit is contained in:
committed by
EmilieNumworks
parent
a0704898b1
commit
7cd05e520a
@@ -1,4 +1,5 @@
|
||||
#include "graph_view.h"
|
||||
#include <float.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
|
||||
@@ -14,6 +14,11 @@ public:
|
||||
void reload() override;
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
void drawTangent(bool tangent) { m_tangent = tangent; }
|
||||
/* We override setAreaHighlightColor to make it reload nothing as the
|
||||
* highlightColor and the non-highlightColor are identical in the graph view
|
||||
* of the application graph. We thereby avoid to uselessly reload some part
|
||||
* of the graph where the area under the curve is colored. */
|
||||
void setAreaHighlightColor(bool highlightColor) override {};
|
||||
private:
|
||||
CartesianFunctionStore * m_functionStore;
|
||||
bool m_tangent;
|
||||
|
||||
@@ -19,8 +19,9 @@ public:
|
||||
void selectFunction(Function * function);
|
||||
void setVerticalCursor(bool verticalCursor);
|
||||
void setAreaHighlight(float start, float end);
|
||||
void setAreaHighlightColor(bool highlightColor);
|
||||
virtual void setAreaHighlightColor(bool highlightColor);
|
||||
protected:
|
||||
void reloadBetweenBounds(float start, float end);
|
||||
Function * m_selectedFunction;
|
||||
bool m_verticalCursor;
|
||||
float m_highlightedStart;
|
||||
@@ -28,7 +29,6 @@ protected:
|
||||
bool m_shouldColorHighlighted;
|
||||
private:
|
||||
KDSize cursorSize() override;
|
||||
void reloadBetweenBounds(float start, float end);
|
||||
char * label(Axis axis, int index) const override;
|
||||
char m_xLabels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
|
||||
char m_yLabels[k_maxNumberOfYLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
|
||||
|
||||
Reference in New Issue
Block a user