Files
Upsilon/apps/regression/graph_view.h
Émilie Feral 5592a51cbc [apps/regression] Improve regression graph drawing
Change-Id: I8e533f6ba47364f0cf68dd49e3df2bf3cde34bcc
2017-01-27 12:01:01 +01:00

27 lines
805 B
C++

#ifndef REGRESSION_GRAPH_VIEW_H
#define REGRESSION_GRAPH_VIEW_H
#include <escher.h>
#include "store.h"
#include "../constant.h"
#include "../curve_view.h"
namespace Regression {
class GraphView : public CurveView {
public:
GraphView(Store * store, CurveViewCursor * cursor, ::BannerView * bannerView, View * cursorView);
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
char * label(Axis axis, int index) const override;
float evaluateModelWithParameter(Model * curve, float t) const override;
Store * m_store;
char m_xLabels[k_maxNumberOfXLabels][Float::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
char m_yLabels[k_maxNumberOfYLabels][Float::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
};
}
#endif