2015-08-07 20:17:33 +00:00
|
|
|
#ifndef TIME_SERIES_CANVAS_H
|
|
|
|
#define TIME_SERIES_CANVAS_H
|
|
|
|
|
|
|
|
class TimeSeriesCanvas
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
struct TimeSeriesInternalData* m_internalData;
|
|
|
|
void shift1PixelToLeft();
|
2018-09-23 21:17:31 +00:00
|
|
|
|
2015-08-07 20:17:33 +00:00
|
|
|
public:
|
|
|
|
TimeSeriesCanvas(struct Common2dCanvasInterface* canvasInterface, int width, int height, const char* windowTitle);
|
|
|
|
virtual ~TimeSeriesCanvas();
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
void setupTimeSeries(float yScale, int ticksPerSecond, int startTime, bool clearCanvas = true);
|
|
|
|
void addDataSource(const char* dataSourceLabel, unsigned char red, unsigned char green, unsigned char blue);
|
2015-08-07 20:17:33 +00:00
|
|
|
void insertDataAtCurrentTime(float value, int dataSourceIndex, bool connectToPrevious);
|
|
|
|
float getCurrentTime() const;
|
2018-09-23 21:17:31 +00:00
|
|
|
void grapicalPrintf(const char* str, void* fontData, int rasterposx, int rasterposy, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha);
|
2015-08-07 20:17:33 +00:00
|
|
|
|
|
|
|
virtual void nextTick();
|
|
|
|
};
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
#endif //TIME_SERIES_CANVAS_H
|