BinaryTransform.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _BinaryTransform_H_
15 #define _BinaryTransform_H_
16 
17 #ifdef _MSC_VER
18 #include "msdevstudio/MSconfig.h" // for CLONE_DEFECT
19 #endif
20 
21 #include "TransformBase.h"
22 
23 #include "axes/AxesType.h"
24 
25 #include <vector>
26 
27 namespace hippodraw {
28 
29  class AxisModelBase;
30  class AxisTick;
31  class Rect;
32  class UnaryTransform;
33 
40 {
41 
42 protected:
43 
46 
49 
52 
55 
58 
60  BinaryTransform ();
61 
67  BinaryTransform ( UnaryTransform *, bool = false, bool = false,
68  bool = true, bool = true);
69 
71  BinaryTransform ( const BinaryTransform & );
72 
73 public:
74 
76  virtual ~BinaryTransform();
77 
79 #ifdef CLONE_DEFECT
80  virtual TransformBase * clone () const = 0;
81 #else
82  virtual BinaryTransform * clone () const = 0;
83 #endif
84 
88  virtual bool isLinearInXY () const = 0;
89 
93  virtual bool isLinearInZ () const;
94 
100  virtual void transform ( double & x, double & y ) const = 0;
101 
106  virtual bool inverseTransform ( double & x, double & y ) const = 0;
107 
109  virtual void transform ( std::vector< double > & x,
110  std::vector< double > & y ) const = 0;
111 
117  virtual double aspectRatio () const;
118 
121  virtual Rect calcRectangle ( const Range & x,
122  const Range & y ) = 0;
123 
126  virtual void validate ( Range & x, Range & y ) const = 0;
127 
129  virtual const Range & limitX () const = 0;
130 
132  virtual const Range & limitY () const = 0;
133 
136  virtual const std::vector < AxisTick > &
137  setTicks ( AxisModelBase & axis_model, hippodraw::Axes::Type axis ) = 0;
138 
141  virtual void adjustValues ( AxisModelBase & model,
143  const Range & limit ) = 0;
144 
146  const Range & limitZ () const;
147 
149  TransformBase * zTransform () const;
150 
155  void setZTransform ( TransformBase * transform );
156 
158  void transformZ ( double & z ) const;
159 
161  void inverseTransformZ ( double & z ) const;
162 
164  bool needsGrid() const;
165 
167  void setNeedsGrid( bool needs_grid );
168 
170  bool needsXTicks() const;
171 
173  void setNeedsXTicks( bool needs_x_ticks );
174 
176  bool needsYTicks() const;
177 
179  void setNeedsYTicks( bool needs_y_ticks );
180 
182  bool isPeriodic() const;
183 
184 
185 };
186 
187 } // namespace hippodraw
188 
189 #endif // _BinaryTransform_H_

Generated for HippoDraw Class Library by doxygen