Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BinaryTransform.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _BinaryTransform_H_
00015 #define _BinaryTransform_H_
00016 
00017 #ifdef _MSC_VER
00018 #include "msdevstudio/MSconfig.h" // for CLONE_DEFECT
00019 #endif
00020 
00021 #include "TransformBase.h"
00022 
00023 #include "axes/AxesType.h"
00024 
00025 #include <vector>
00026 
00027 class AxisModelBase;
00028 class AxisTick;
00029 class HippoRectangle;
00030 class UnaryTransform;
00031 
00037 class MDL_HIPPOPLOT_API BinaryTransform : public TransformBase
00038 {
00039 
00040 protected:
00041   
00043   UnaryTransform * m_z;
00044   
00046   bool m_needs_grid;
00047   
00049   bool m_needs_x_ticks;
00050   
00052   bool m_needs_y_ticks;
00053 
00055   bool m_is_periodic;
00056 
00058   BinaryTransform ();
00059 
00065   BinaryTransform ( UnaryTransform *, bool = false, bool  = false,
00066                     bool  = true, bool  = true);
00067   
00069   BinaryTransform ( const BinaryTransform & );
00070   
00071 public:
00072   
00074   virtual ~BinaryTransform();
00075   
00077 #ifdef CLONE_DEFECT
00078   virtual TransformBase   * clone () const = 0;
00079 #else
00080   virtual BinaryTransform * clone () const = 0;
00081 #endif
00082   
00086   virtual bool isLinearInXY () const = 0;
00087 
00093   virtual void transform ( double & x, double & y ) const = 0;
00094   
00097   virtual void inverseTransform ( double & x, double & y ) const = 0;
00098   
00100   virtual void transform ( std::vector< double > & x, 
00101                            std::vector< double > & y ) const = 0;
00102 
00108   virtual double aspectRatio () const;
00109 
00111   virtual HippoRectangle calcRectangle ( const Range & x, 
00112                                          const Range & y ) = 0;
00113 
00116   virtual void  validate ( Range & x, Range & y ) const = 0;
00117 
00119   virtual const Range & limitX () const = 0;
00120 
00122   virtual const Range & limitY () const = 0;
00123 
00126   virtual const std::vector < AxisTick > &
00127   setTicks ( AxisModelBase & axis_model, hippodraw::Axes::Type axis ) = 0;
00128 
00131   virtual void adjustValues ( AxisModelBase & model,
00132                               hippodraw::Axes::Type  axes,
00133                               const Range & limit ) = 0;
00134   
00136   const Range & limitZ () const;
00137 
00139   TransformBase * zTransform () const;
00140 
00145   void setZTransform ( TransformBase * transform );
00146 
00148   void transformZ ( double & z ) const;
00149 
00151   void inverseTransformZ ( double & z ) const;
00152   
00154   bool needsGrid() const;
00155 
00157   void setNeedsGrid( bool needs_grid );
00158 
00160   bool needsXTicks() const;
00161 
00163   void setNeedsXTicks( bool needs_x_ticks );
00164 
00166   bool needsYTicks() const;
00167 
00169   void setNeedsYTicks( bool needs_y_ticks );
00170 
00172   bool isPeriodic() const;
00173 
00174   
00175 };
00176 
00177 #endif // _BinaryTransform_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3