13 #include "msdevstudio/MSconfig.h"
34 const std::string xname =
m_x->
name ();
35 const std::string yname =
m_y->
name ();
36 const std::string zname = z->
name ();
75 return m_x -> isLinear () &&
m_y -> isLinear ();
102 std::vector< double > & y )
const
116 double x_lo = x.
low ();
117 double x_hi = x.
high ();
118 double y_lo = y.
low ();
119 double y_hi = y.
high ();
124 return Rect ( x_lo, y_lo, x_hi - x_lo, y_hi - y_lo );
155 const vector < AxisTick > &
174 const Range & limit )
virtual const Range & limitY() const
Returns a Range whose values are the limits on the Y coordinate.
virtual void adjustValues(AxisModelBase &model, hippodraw::Axes::Type axes, const Range &limit)
Sets the range of given axis to be a new "nice" within the limits given.
virtual const std::vector< AxisTick > & setTicks(AxisModelBase &axis)=0
Sets the vector of ticks along the axis to which this unary transform is applied. ...
virtual void inverseTransform(double &x) const =0
Inverse transforms the coordinate x.
virtual const Range & limitX() const
Returns a Range whose values are the limits on the X coordinate.
XYTransform(UnaryTransform *x, UnaryTransform *y, UnaryTransform *z)
The following constructor takes three base constructors as arguments.
TransformBase * yTransform() const
Returns the transform function on the Y axis.
virtual void validate(Range &) const =0
Validates the Range.
virtual XYTransform * clone() const
Creates a new Transform object by copying an existing one.
A transform that transforms coordinates from one coordinate system to another.
std::string m_name
Name of the Transform.
virtual bool inverseTransform(double &x, double &y) const
Transform the transformed coordinates on X and Y axis back to the original true data space...
double low() const
Returns the minimum of the range object.
virtual void transform(double &x, double &y) const
Transform the coordinates on the X and Y axes.
virtual ~XYTransform()
The virtual destructor.
UnaryTransform * m_z
The transform on the Z axis.
virtual void validate(Range &x, Range &y) const
Validates the Ranges.
const std::string & name() const
Returns the name of the Transform.
UnaryTransform * m_y
The transform on the Y axis.
A transform that transforms coordinates from one 2D coordinate system to another. ...
UnaryTransform class interface.
virtual bool isLinearInXY() const
Returns true if the transform would be one to one on both the X and Y axes.
virtual const std::vector< AxisTick > & setTicks(AxisModelBase &axis_model, hippodraw::Axes::Type axis)
Sets and return the axis ticks on specified axis.
hippodrw::Rect class interface
double high() const
Returns the maximum of the range object.
hippodraw::XYTransform class interface
TransformBase * xTransform() const
Returns the transform function on the X axis.
UnaryTransform * m_x
The transform on the X axis.
Class representing a rectangle.
virtual UnaryTransform * clone() const =0
Function to make copy of object.
virtual Rect calcRectangle(const Range &x, const Range &y)
Returns a rectangle enclosing the transformed data space.
virtual void transform(double &x) const =0
The AxisModelBase class maintains the Range and scaling of an axis.
A transform that transforms coordinates in one dimension from one coordinate system to another...
virtual double aspectRatio() const
Returns the aspect ratio.
virtual const Range & limits() const
Returns a Range whose values are the limits on the coordinate.
Expresses a range of values.
A transform that transforms the X and Y coordinates independently.