Files
Upsilon/apps/regression/graph_view.h
Émilie Feral 2293d9f933 [apps] Factorize the reload methods in all subclasses of curve view
Change-Id: I77e04df7ab36b46582c221f7e07797e6d1bce0e2
2017-01-09 15:08:55 +01:00

32 lines
857 B
C++

#ifndef REGRESSION_GRAPH_VIEW_H
#define REGRESSION_GRAPH_VIEW_H
#include <escher.h>
#include "data.h"
#include "banner_view.h"
#include "../constant.h"
#include "../cursor_view.h"
#include "../curve_view_with_banner_and_cursor.h"
namespace Regression {
class GraphView : public CurveViewWithBannerAndCursor {
public:
GraphView(Data * m_data);
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
constexpr static KDCoordinate k_dotSize = 5;
char * label(Axis axis, int index) const override;
BannerView * bannerView() override;
float evaluateModelWithParameter(Model * curve, float t) const override;
Data * m_data;
char m_xLabels[k_maxNumberOfXLabels][Constant::FloatBufferSizeInScientificMode];
char m_yLabels[k_maxNumberOfYLabels][Constant::FloatBufferSizeInScientificMode];
BannerView m_bannerView;
};
}
#endif