#include <AxisRepBase.h>
Inheritance diagram for AxisRepBase:
The derived classes use the information kept by the AxisModelBase hierarchy objects. They communicate with the ViewBase hierarchy objects in order to get the information concerning the actual display. They are, therefore, carrying out adequate calculations of fonts and positions to be drawn in good proportion to the axes, their labels, and the main title.
Kaustuv <kaustuv@stanford.edu>
Definition at line 50 of file AxisRepBase.h.
Public Member Functions | |
AxisRepBase (const AxisRepBase &axis_rep) | |
The copy constructor. | |
AxisRepBase () | |
The default constructor. | |
void | beginPlot (ViewBase &view) |
Every class which draws has its beginPlot function. | |
virtual AxisRepBase * | clone ()=0 |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
virtual void | drawAllXTicks (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, const TransformBase &transform, ViewBase &view) |
This function is the principal function of the ticks drawing family because it draws the ticks on the X axis by calling the required functions. | |
virtual void | drawAllYTicks (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, const TransformBase &transform, ViewBase &view) |
This function is the principal function of the ticks drawing family because it draws the ticks on the Y axis by calling the required functions. | |
virtual void | drawAllZTicks (const AxisModelBase &axis_model, const TransformBase &transform, ViewBase &view)=0 |
This function is the principal function of the ticks drawing family because it draws the ticks on the Z axis by calling the required functions. | |
virtual void | drawAxesLines (TransformBase &transform, ViewBase &view, const Range &x_range, const Range &y_range) |
Draws the axes lines after transformation. | |
virtual void | drawColorScale (const BinToColor &, ViewBase &) |
Draws the color scale bar. | |
virtual void | drawCrossHairs (double x, double y, TransformBase &transform, ViewBase &view) |
Draws the cross hairs after transformation. | |
virtual void | drawGridLines (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, TransformBase &transform, ViewBase &view) |
Draws the grid lines after transformation. | |
virtual void | drawTitle (ViewBase &view, const std::string &title) |
Draws the title. | |
void | drawXLabels (const AxisModelBase &axis_model, ViewBase &view, const std::string &x_label) |
Draws the labels of the x axis. | |
void | drawYLabels (const AxisModelBase &axis_model, ViewBase &view, const std::string &y_label) |
Draws the labels of the y axis. | |
void | drawYMag (const AxisModelBase &axisModel, ViewBase &view) |
Draws the Y magnitude label. | |
virtual void | drawZLabels (const AxisModelBase &axis_model, ViewBase &view, const std::string &z_label)=0 |
virtual void | endPlot ()=0 |
Every class which draws has its beginPlot function. | |
void | setDrawAxes (bool set) |
Sets the m_draw_axes flag to the set value. | |
void | setDrawTitles (bool set) |
Sets the m_draw_titles flag to the set value. | |
virtual void | setFontSize (const AxisModelBase *x_axis, const AxisModelBase *y_axis, const AxisModelBase *z_axis, ViewBase &view) |
Adjusts the font sizes. | |
void | setTitleFont (FontBase *font) |
Set the font to be used to override the default while drawing title. | |
void | setXFontSize (const AxisModelBase &axis_model, ViewBase &view) |
Calculates the font size for the x axis. | |
void | setXLabelFont (FontBase *font) |
Set the font tobe used to override the default while drawing X label. | |
void | setYFontSize (const AxisModelBase &axis_model, ViewBase &view) |
Calculates the font size for the y axis. | |
void | setYLabelFont (FontBase *font) |
Set the font to be used to override the default while drawing Y label. | |
void | setZFontSize (const AxisModelBase &axis_model, ViewBase &view) |
Calculates the font size for the z axis, if any. | |
void | setZLabelFont (FontBase *font) |
Set the font to be used to override the default while drawing Z label. | |
FontBase * | titleFont () |
What font is being used to override the default while drawing title of plot. | |
FontBase * | xLabelFont () |
What font is being used to override the default while drawing X label. | |
FontBase * | yLabelFont () |
What font is being used to override the default while drawing Y label. | |
FontBase * | zLabelFont () |
What font is being used to override the default while drawing Z label. | |
virtual | ~AxisRepBase () |
The virtual destructor. | |
Protected Member Functions | |
void | drawXTickLabels (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, const TransformBase &transform, ViewBase &view) |
Draws the labels for the X ticks. | |
void | drawXTickLines (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, const TransformBase &transform, ViewBase &view) |
Draws the X tick lines. | |
void | drawYTickLabels (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, const TransformBase &transform, ViewBase &view) |
Draws the labels for the Y ticks. | |
void | drawYTickLines (const AxisModelBase &axisModelX, const AxisModelBase &axisModelY, const TransformBase &transform, ViewBase &view) |
Draws the Y tick lines. | |
void | initAxisRect (ViewBase &view) |
Gets the sizes of the two rectangles (the rectangles of the drawing on the screen) memorized by the ViewBase object, and initializes the m_axis_x_origin, m_axis_y_origin, m_axis_width, and m_axis_height fields. | |
Protected Attributes | |
float | m_axis_height |
The height of the rectangle in which the drawing is made. | |
float | m_axis_width |
The width of the rectangle in which the drawing is made. | |
float | m_axis_x_origin |
The x coordinate of the origin of the coordinate system. | |
float | m_axis_y_origin |
The y coordinate of the origin of the coordinate system. | |
bool | m_draw_axes |
The following flag indicates whether the axes have to be drawn or not. | |
bool | m_draw_titles |
The following flag indicates whether the titles have to be drawn or not. | |
double | m_font_size |
Font size for the tick labels. | |
FontBase * | m_titleFont |
The font to be used to for the Z label overriding the default font. | |
double | m_x_font_size |
Font size for X axis label. | |
FontBase * | m_xLabelFont |
The font to be used to for the X label overriding the default font. | |
double | m_y_font_size |
Font size for the Y axis label. | |
FontBase * | m_yLabelFont |
The font to be used to for the Y label overriding the default font. | |
double | m_z_font_size |
Font size for the Z axis label. | |
FontBase * | m_zLabelFont |
The font to be used to for the Z label overriding the default font. |
|
The default constructor.
Definition at line 51 of file AxisRepBase.cxx. |
|
The copy constructor.
Definition at line 68 of file AxisRepBase.cxx. |
|
The virtual destructor.
Definition at line 85 of file AxisRepBase.cxx. References m_titleFont, m_xLabelFont, m_yLabelFont, and m_zLabelFont. |
|
Every class which draws has its beginPlot function. It initializes the data that it requires. (For example, it might get the size of the actual drawing on the screen in order to set the good font size of the writing, etc...). Definition at line 112 of file AxisRepBase.cxx. References initAxisRect(). Referenced by XyPlotter::drawIn(). |
|
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implemented in AxisRep2D, and AxisRepColor. |
|
This function is the principal function of the ticks drawing family because it draws the ticks on the X axis by calling the required functions.
Definition at line 966 of file AxisRepBase.cxx. References drawXTickLabels(), and drawXTickLines(). Referenced by CompositePlotter::drawAxisRep(). |
|
This function is the principal function of the ticks drawing family because it draws the ticks on the Y axis by calling the required functions.
Definition at line 977 of file AxisRepBase.cxx. References drawYTickLabels(), and drawYTickLines(). Referenced by CompositePlotter::drawAxisRep(). |
|
This function is the principal function of the ticks drawing family because it draws the ticks on the Z axis by calling the required functions.
Implemented in AxisRep2D, and AxisRepColor. Referenced by CompositePlotter::drawAxisRep(). |
|
Draws the axes lines after transformation. This forms the rectangle in which the plot is drawn. Definition at line 357 of file AxisRepBase.cxx. References ViewBase::drawPolyLine(), Range::high(), Range::low(), hippodraw::Line::Solid, and BinaryTransform::transform(). Referenced by CompositePlotter::drawAxisRep(). |
|
Draws the color scale bar. The base class implementation raises an assertion as it should never be called. Reimplemented in AxisRepColor. Definition at line 1058 of file AxisRepBase.cxx. Referenced by CompositePlotter::drawAxisRep(). |
|
Draws the cross hairs after transformation.
Definition at line 916 of file AxisRepBase.cxx. References ViewBase::drawLines(), BinaryTransform::isPeriodic(), m_axis_height, m_axis_width, m_axis_x_origin, m_axis_y_origin, PeriodicBinaryTransform::moduloSubX(), PeriodicBinaryTransform::moduloSubY(), hippodraw::Line::Solid, BinaryTransform::transform(), PeriodicBinaryTransform::xOffset(), and PeriodicBinaryTransform::yOffset(). Referenced by XyPlotter::drawCrossHairs(). |
|
Draws the grid lines after transformation. This grids the enclosed region ( rectangle or ellipse ) in which the plot is drawn. Definition at line 418 of file AxisRepBase.cxx. References ViewBase::drawPolyLine(), AxisModelBase::getRange(), AxisModelBase::getTicks(), Range::high(), Range::low(), hippodraw::Line::Solid, BinaryTransform::transform(), and BinaryTransform::validate(). Referenced by CompositePlotter::drawAxisRep(). |
|
Draws the title.
Definition at line 124 of file AxisRepBase.cxx. References ViewBase::drawText(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), ViewBase::getMarginRect(), HippoRectangle::getWidth(), HippoRectangle::getX(), m_font_size, m_titleFont, std::max(), std::min(), and YPADDING(). Referenced by XyPlotter::drawIn(). |
|
Draws the labels of the x axis.
Definition at line 247 of file AxisRepBase.cxx. References ViewBase::drawText(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), AxisModelBase::getLabelLocation(), ViewBase::getMarginRect(), HippoRectangle::getWidth(), HippoRectangle::getX(), m_x_font_size, m_xLabelFont, std::max(), std::min(), PLOTBOTTOM, PLOTTOP, and YPADDING(). Referenced by CompositePlotter::drawAxisRep(). |
|
Draws the labels for the X ticks.
Definition at line 725 of file AxisRepBase.cxx. References AxisTick::content(), ViewBase::drawMag(), ViewBase::drawText(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), ViewBase::getMarginRect(), AxisModelBase::getPMag(), AxisModelBase::getRange(), AxisModelBase::getScaleLocation(), AxisModelBase::getTicks(), HippoRectangle::getWidth(), HippoRectangle::getX(), HippoRectangle::getY(), Range::high(), AxisModelBase::isLog(), Range::low(), m_font_size, std::min(), AxisModelBase::needPMag(), PLOTBOTTOM, num_util::size(), std::sqrt(), BinaryTransform::transform(), ViewBase::userToDrawX(), ViewBase::userToDrawY(), XPADDING(), and YPADDING(). Referenced by drawAllXTicks(). |
|
Draws the X tick lines.
Definition at line 494 of file AxisRepBase.cxx. References ViewBase::drawViewLines(), HippoRectangle::getHeight(), AxisModelBase::getLabelLocation(), ViewBase::getMarginRect(), AxisModelBase::getRange(), AxisModelBase::getTicks(), Range::high(), Range::low(), PLOTBOTTOM, PLOTTOP, num_util::size(), hippodraw::Line::Solid, std::sqrt(), BinaryTransform::transform(), ViewBase::userToDrawX(), and ViewBase::userToDrawY(). Referenced by drawAllXTicks(). |
|
Draws the labels of the y axis.
Definition at line 295 of file AxisRepBase.cxx. References ViewBase::drawText(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), AxisModelBase::getLabelLocation(), ViewBase::getMarginRect(), HippoRectangle::getWidth(), HippoRectangle::getY(), m_y_font_size, m_yLabelFont, std::max(), std::min(), PLOTLEFT, PLOTRIGHT, and XPADDING(). Referenced by CompositePlotter::drawAxisRep(). |
|
Draws the Y magnitude label.
Definition at line 334 of file AxisRepBase.cxx. References ViewBase::drawMag(), ViewBase::getDrawRect(), ViewBase::getMarginRect(), AxisModelBase::getPMag(), AxisModelBase::getScaleLocation(), HippoRectangle::getX(), HippoRectangle::getY(), m_font_size, and PLOTLEFT. Referenced by drawYTickLabels(). |
|
Draws the labels for the Y ticks.
Definition at line 843 of file AxisRepBase.cxx. References ViewBase::drawText(), drawYMag(), AxisModelBase::getRange(), AxisModelBase::getTicks(), Range::high(), AxisModelBase::isLog(), Range::low(), m_font_size, AxisModelBase::needPMag(), num_util::size(), std::sqrt(), BinaryTransform::transform(), ViewBase::userToDrawX(), ViewBase::userToDrawY(), XPADDING(), and YPADDING(). Referenced by drawAllYTicks(). |
|
Draws the Y tick lines.
Definition at line 601 of file AxisRepBase.cxx. References ViewBase::drawViewLines(), AxisModelBase::getLabelLocation(), ViewBase::getMarginRect(), AxisModelBase::getRange(), AxisModelBase::getTicks(), HippoRectangle::getWidth(), Range::high(), Range::low(), PLOTLEFT, PLOTRIGHT, num_util::size(), hippodraw::Line::Solid, std::sqrt(), BinaryTransform::transform(), ViewBase::userToDrawX(), and ViewBase::userToDrawY(). Referenced by drawAllYTicks(). |
|
Implemented in AxisRep2D, and AxisRepColor. Referenced by CompositePlotter::drawAxisRep(). |
|
Every class which draws has its beginPlot function. It puts an end to the plot, and I don't have any examples because as I write those lines, this function is empty :) . Sorry. Implemented in AxisRep2D, and AxisRepColor. |
|
Gets the sizes of the two rectangles (the rectangles of the drawing on the screen) memorized by the ViewBase object, and initializes the m_axis_x_origin, m_axis_y_origin, m_axis_width, and m_axis_height fields. Having the dimensions of the place where they will be drawn, the AxisRepBase object will then be able to calculate the adequate values of the different components of the drawing. Definition at line 95 of file AxisRepBase.cxx. References HippoRectangle::getHeight(), ViewBase::getUserRect(), HippoRectangle::getWidth(), HippoRectangle::getX(), HippoRectangle::getY(), m_axis_height, m_axis_width, m_axis_x_origin, and m_axis_y_origin. Referenced by beginPlot(). |
|
Sets the m_draw_axes flag to the set value.
Definition at line 105 of file AxisRepBase.cxx. References m_draw_axes. |
|
Sets the m_draw_titles flag to the set value.
Definition at line 117 of file AxisRepBase.cxx. References m_draw_titles. |
|
Adjusts the font sizes. The font sizes are adjusted according to the size of the view on a canvas. Definition at line 710 of file AxisRepBase.cxx. References ViewBase::getDrawRect(), HippoRectangle::getWidth(), m_font_size, std::max(), std::min(), setXFontSize(), setYFontSize(), and setZFontSize(). Referenced by CompositePlotter::drawAxisRep(). |
|
Set the font to be used to override the default while drawing title.
Definition at line 1040 of file AxisRepBase.cxx. References m_titleFont. |
|
Calculates the font size for the x axis. It is called by setFontSize(...). Definition at line 156 of file AxisRepBase.cxx. References ViewBase::getDrawRect(), HippoRectangle::getHeight(), AxisModelBase::getScaleLocation(), HippoRectangle::getY(), m_axis_height, m_axis_y_origin, m_font_size, m_x_font_size, std::min(), PLOTBOTTOM, and PLOTTOP. Referenced by setFontSize(). |
|
Set the font tobe used to override the default while drawing X label.
Definition at line 987 of file AxisRepBase.cxx. References m_xLabelFont. |
|
Calculates the font size for the y axis. It is called by setFontSize(...). Definition at line 180 of file AxisRepBase.cxx. References AxisTick::content(), ViewBase::getDrawRect(), AxisModelBase::getLabelLocation(), AxisModelBase::getScaleLocation(), AxisModelBase::getTicks(), HippoRectangle::getWidth(), HippoRectangle::getX(), m_axis_width, m_axis_x_origin, m_draw_titles, m_font_size, m_y_font_size, std::min(), PLOTLEFT, and PLOTRIGHT. Referenced by setFontSize(). |
|
Set the font to be used to override the default while drawing Y label.
Definition at line 1005 of file AxisRepBase.cxx. References m_yLabelFont. |
|
Calculates the font size for the z axis, if any. It is called by setFontSize(...). Definition at line 224 of file AxisRepBase.cxx. References ViewBase::getDrawRect(), HippoRectangle::getHeight(), AxisModelBase::getScaleLocation(), HippoRectangle::getY(), m_axis_height, m_axis_y_origin, m_font_size, m_z_font_size, std::min(), PLOTBOTTOM, and PLOTTOP. Referenced by setFontSize(). |
|
Set the font to be used to override the default while drawing Z label.
Definition at line 1023 of file AxisRepBase.cxx. References m_zLabelFont. |
|
What font is being used to override the default while drawing title of plot.
Definition at line 1052 of file AxisRepBase.cxx. References m_titleFont. |
|
What font is being used to override the default while drawing X label.
Definition at line 999 of file AxisRepBase.cxx. References m_xLabelFont. |
|
What font is being used to override the default while drawing Y label.
Definition at line 1017 of file AxisRepBase.cxx. References m_yLabelFont. |
|
What font is being used to override the default while drawing Z label.
Definition at line 1035 of file AxisRepBase.cxx. References m_zLabelFont. |
|
The height of the rectangle in which the drawing is made.
Definition at line 69 of file AxisRepBase.h. Referenced by drawCrossHairs(), initAxisRect(), setXFontSize(), and setZFontSize(). |
|
The width of the rectangle in which the drawing is made.
Definition at line 66 of file AxisRepBase.h. Referenced by drawCrossHairs(), initAxisRect(), and setYFontSize(). |
|
The x coordinate of the origin of the coordinate system. It is in fact the x coordinate of the lower left corner of the rectangle in which the drawing is made. Definition at line 58 of file AxisRepBase.h. Referenced by drawCrossHairs(), initAxisRect(), and setYFontSize(). |
|
The y coordinate of the origin of the coordinate system. It is in fact the y coordinate of the lower left corner of the rectangle in which the drawing is made. Definition at line 63 of file AxisRepBase.h. Referenced by drawCrossHairs(), initAxisRect(), setXFontSize(), and setZFontSize(). |
|
The following flag indicates whether the axes have to be drawn or not.
Definition at line 101 of file AxisRepBase.h. Referenced by setDrawAxes(). |
|
The following flag indicates whether the titles have to be drawn or not.
Definition at line 105 of file AxisRepBase.h. Referenced by setDrawTitles(), and setYFontSize(). |
|
Font size for the tick labels.
Definition at line 73 of file AxisRepBase.h. Referenced by drawTitle(), drawXTickLabels(), drawYMag(), drawYTickLabels(), AxisRepColor::drawZTickLabels(), setFontSize(), setXFontSize(), setYFontSize(), and setZFontSize(). |
|
The font to be used to for the Z label overriding the default font.
Definition at line 97 of file AxisRepBase.h. Referenced by drawTitle(), setTitleFont(), titleFont(), and ~AxisRepBase(). |
|
Font size for X axis label.
Definition at line 77 of file AxisRepBase.h. Referenced by drawXLabels(), and setXFontSize(). |
|
The font to be used to for the X label overriding the default font.
Definition at line 88 of file AxisRepBase.h. Referenced by drawXLabels(), setXLabelFont(), xLabelFont(), and ~AxisRepBase(). |
|
Font size for the Y axis label.
Definition at line 81 of file AxisRepBase.h. Referenced by drawYLabels(), and setYFontSize(). |
|
The font to be used to for the Y label overriding the default font.
Definition at line 91 of file AxisRepBase.h. Referenced by drawYLabels(), setYLabelFont(), yLabelFont(), and ~AxisRepBase(). |
|
Font size for the Z axis label.
Definition at line 85 of file AxisRepBase.h. Referenced by AxisRepColor::drawZLabels(), and setZFontSize(). |
|
The font to be used to for the Z label overriding the default font.
Definition at line 94 of file AxisRepBase.h. Referenced by AxisRepColor::drawZLabels(), setZLabelFont(), zLabelFont(), and ~AxisRepBase(). |