00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00029 #ifndef _METRIVIS_TIME_LINE_VISUALIZER_H
00030 #define _METRIVIS_TIME_LINE_VISUALIZER_H
00031
00032
00033 #include "container/MultiType.h"
00034 #include "pipeline/PipelineProcess.h"
00035 #include "BaseClass.h"
00036 #include <plplot/plstream.h>
00037 #include <cairo/cairo.h>
00038
00039 namespace metrivis {
00040
00041
00051 cairo_status_t TimeLineCallBackFunction(void *closure,
00052 const unsigned char *data,
00053 unsigned int length);
00054
00055
00056
00062 class TimeLineVisualizer : public PipelineProcess, public BaseClass {
00063
00064 public:
00065
00069 TimeLineVisualizer();
00070
00074 virtual ~TimeLineVisualizer();
00075
00082 virtual void Execute();
00083
00091 virtual void Reset();
00092
00093
00100 cairo_status_t WriteImageData(const unsigned char *data, unsigned int length);
00101
00102
00112 void set_borders(double min_x, double min_y, double max_x, double max_y) {
00113 min_x_ = min_x;
00114 min_y_ = min_y;
00115 max_x_ = max_x;
00116 max_y_ = max_y;
00117 }
00118
00119
00128 void set_tile_index(int x, int y, int zoom) {
00129 x_ = x;
00130 y_ = y;
00131 zoom_ = zoom;
00132
00133
00134 }
00135
00136
00143 void set_debug(int debug_mode) {
00144 debug_mode_ = debug_mode;
00145 }
00146
00147
00152 void set_time_window(long min_time, long max_time) {
00153 time_window_min_ = min_time;
00154 time_window_max_ = max_time;
00155 }
00156
00157
00158 private:
00159
00160 int frame_size_;
00161
00162 double min_x_;
00163 double min_y_;
00164 double max_x_;
00165 double max_y_;
00166
00167 int x_;
00168 int y_;
00169 int zoom_;
00170
00171 long time_window_min_;
00172 long time_window_max_;
00173
00174 int debug_mode_;
00175
00176
00177
00178
00179 };
00180
00181 }
00182
00183 #endif // _METRIVIS_TIME_LINE_VISUALIZER_H