14 #include "msdevstudio/MSconfig.h"
68 float marginXLeft = draw.
getHeight () * 0.20;
69 marginXLeft = std::min ( marginXLeft, 55.0f );
70 float marginXRight = 20.0 ;
76 float marginYTop = 30.0;
83 marginYTop = marginYTop+titlefont->
pointSize()-9.0;
87 marginYTop = marginYTop+zfont->
pointSize()-7.0;
91 float marginYBottom = 34.0 ;
94 marginYBottom = marginYBottom+labelfont->
pointSize()-11.0;
104 float marginWidth = width - marginXLeft - marginXRight;
105 float marginHeight =height - marginYTop - marginYBottom;
107 if ( aspect_ratio > 0.0 ) {
108 if ( marginWidth /aspect_ratio > marginHeight ){
109 marginWidth = aspect_ratio*marginHeight;
112 marginHeight = marginWidth/aspect_ratio;
117 marginWidth, marginHeight );
125 double diff = x - user_rect.
getX ();
136 double diff = x - user_rect.
getX ();
148 + ( y - user_rect.
getY () )
159 - ( y - user_rect.
getY () )
170 + ( c - user_rect.
getZ () )
180 return user_rect.
getX ()
191 return user_rect.
getX ()
202 return user_rect.
getY ()
213 return user_rect.
getY () +
double getY() const
A shortcut to get origin.Y.
The base class for the PlotterBase hierarchy.
const Rect & getMarginRect() const
Returns the rectangle area in which data points are drawn.
virtual double getBottomMargin()
A abstract base class for font handling.
PlotterBase * m_plotter
The plotter object used by this view.
hippodraw::DataView class interface
virtual Rect getDrawRect() const =0
Returns the drawing Rectangle in the devices coordinate system.
FontBase class interface.
PlotterBase * getPlotter() const
Returns the plotter used by this view.
virtual FontBase * labelFont(Axes::Type axes) const
What font is being used to override the default while drawing axis label.
double getX() const
A shortcut to get origin.X.
double getWidth() const
A shortcut to get size.width.
virtual float userToMarginX(double x) const
Converts the user X coordinate into the margin X coordinate.
hippodraw::PlotterBase class interface.
virtual double getLeftMargin()
virtual double getAspectRatio() const
Get the aspect ratio.
virtual float userToMarginColor(double c) const
Converts the user Z coordinate into the margin color (X) coordinate.
virtual double marginToUserY(double y) const
Converts from view coordinate to data coordinate, without taking into account transforms or scaling...
virtual float userToInvertedMarginX(double x) const
Converts the user X coordinate into the inverted X coordinate.
hippodraw::Range class interface
virtual double getTopMargin()
Rect m_margin_rect
The rectangle area in which the projected points are plotted.
virtual const FontBase * titleFont() const
What font is being used to override the default while drawing title of plot.
void setRect(double x, double y, double width, double height)
Set the parameters of 2D Rectangle.
void setMarginRect(const Rect &)
Sets the margin rectangle.
const Rect & getUserRect() const
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where ...
DataView()
The default constructor.
virtual double marginToInvertedUserX(double x) const
Converts from view coordinate to data conordiate, take into account the inversion of x axes...
virtual int pointSize() const =0
Get the pointsize of the font.
double getHeight() const
A shortcut to get size.height.
Class representing a rectangle.
virtual ~DataView()
The virtual destructor.
virtual double marginToUserX(double x) const
Converts from view coordinate to data coordinate, without taking into account transforms or scaling...
virtual double marginToInvertedUserY(double y) const
Converts from inverted view coordinate to data coordinate, without taking into account transforms or ...
double getZ() const
A shortcut to get origin.Z.
virtual float userToInvertedMarginY(double y) const
Converts the user Y coordinate into the top-left based margin Y coordinate.
double getDepth() const
A shortcut to get size.depth.
virtual double getZMargin()
virtual float userToMarginY(double y) const
Converts the user Y coordinate into the margin Y coordinate.
void prepareMarginRect()
Prepares the margin rectangle.
The abstract base class for views.