14 #include "msdevstudio/MSconfig.h"
23 using namespace hippodraw;
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 () +
virtual float userToMarginColor(double c) const
Converts the user Z coordinate into the margin color (X) coordinate.
virtual double getTopMargin()
double getHeight() const
A shortcut to get size.height.
virtual ~DataView()
The virtual destructor.
virtual FontBase * labelFont(Axes::Type axes) const
What font is being used to override the default while drawing axis label.
void prepareMarginRect()
Prepares the margin rectangle.
virtual double getAspectRatio() const
Get the aspect ratio.
virtual float userToMarginX(double x) const
Converts the user X coordinate into the margin X coordinate.
virtual Rect getDrawRect() const =0
Returns the drawing Rectangle in the devices coordinate system.
double getWidth() const
A shortcut to get size.width.
A abstract base class for font handling.
The base class for the PlotterBase hierarchy.
PlotterBase * getPlotter() const
Returns the plotter used by this view.
PlotterBase * m_plotter
The plotter object used by this view.
void setRect(double x, double y, double width, double height)
Set the parameters of 2D Rectangle.
virtual double marginToUserY(double y) const
Converts from view coordinate to data coordinate, without taking into account transforms or scaling...
hippodraw::DataView class interface
virtual double getBottomMargin()
virtual double getZMargin()
double getZ() const
A shortcut to get origin.Z.
double getDepth() const
A shortcut to get size.depth.
virtual float userToInvertedMarginX(double x) const
Converts the user X coordinate into the inverted X coordinate.
Class representing a rectangle.
virtual const FontBase * titleFont() const
What font is being used to override the default while drawing title of plot.
void setMarginRect(const Rect &)
Sets the margin rectangle.
The abstract base class for views.
Rect m_margin_rect
The rectangle area in which the projected points are plotted.
FontBase class interface.
virtual double getLeftMargin()
virtual float userToMarginY(double y) const
Converts the user Y coordinate into the margin Y coordinate.
double getX() const
A shortcut to get origin.X.
const Rect & getUserRect() const
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where ...
hippodraw::Range class interface
DataView()
The default constructor.
const Rect & getMarginRect() const
Returns the rectangle area in which data points are drawn.
virtual float userToInvertedMarginY(double y) const
Converts the user Y coordinate into the top-left based margin Y coordinate.
virtual int pointSize() const =0
Get the pointsize of the font.
virtual double marginToInvertedUserX(double x) const
Converts from view coordinate to data conordiate, take into account the inversion of x axes...
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 getY() const
A shortcut to get origin.Y.
hippodraw::PlotterBase class interface.