MetriVis Overview | Download | User Manual | Development
Reference Overview | Design Documentation | Reference Backend | Reference Frontend

src/XYPlotVisualizer.h

Go to the documentation of this file.
00001 /*
00002  *   MetriVis - Metrics Visualization Application
00003  *
00004  *
00005  *   License notice:
00006  *
00007  *   This program is free software: you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation, either version 3 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  */
00021 
00022 
00029 #ifndef _METRIVIS_XY_PLOT_VISUALIZER_H
00030 #define _METRIVIS_XY_PLOT_VISUALIZER_H
00031 
00032 
00033 #include "container/MultiType.h"
00034 #include "pipeline/PipelineProcess.h"
00035 #include "BaseClass.h"
00036 #include <cairo/cairo-features.h>
00037 #include <cairo/cairo.h>
00038 
00039 namespace metrivis {
00040 
00041 
00042 
00052 cairo_status_t XYPlotCallBackFunction(void *closure, const unsigned char *data,
00053                                      unsigned int length);
00054 
00055 
00061 class XYPlotVisualizer : public PipelineProcess, public BaseClass {
00062 
00063 public:
00064 
00068   XYPlotVisualizer();
00069 
00073   virtual ~XYPlotVisualizer();
00074 
00081   virtual void Execute();
00082 
00090   virtual void Reset();
00091 
00098   cairo_status_t WriteImageData(const unsigned char *data, unsigned int length);
00099 
00100 
00110   void set_borders(double min_x, double min_y, double max_x, double max_y) {
00111     min_x_ = min_x;
00112     min_y_ = min_y;
00113     max_x_ = max_x;
00114     max_y_ = max_y;
00115   }
00116 
00117 
00126   void set_tile_index(int x, int y, int zoom_x, int zoom_y) {
00127     x_ = x;
00128     y_ = y;
00129     zoom_x_ = zoom_x;
00130     zoom_y_ = zoom_y;
00131   }
00132 
00133 
00140   void set_debug(int debug_mode) {
00141     debug_mode_ = debug_mode;
00142   }
00143 
00144 
00145 private:
00146 
00153   double PixelToTime(long pixel_x, int zoom);
00154 
00155 
00156 private:
00157 
00158   int frame_size_;    
00159 
00160   double min_x_;      
00161   double min_y_;      
00162   double max_x_;      
00163   double max_y_;      
00164 
00165   int x_;             
00166   int y_;             
00167   int zoom_;          
00168   int zoom_x_;        
00169   int zoom_y_;        
00170 
00171   int debug_mode_;    
00172 
00173 
00174 
00175   //plstream plplot_stream_; //!< PLplot drawing stream.
00176 };
00177 
00178 }
00179 
00180 #endif // _METRIVIS_XY_PLOT_VISUALIZER_H

Generated on Fri Feb 29 16:47:19 2008 for MetriVis by  doxygen 1.5.3