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