#include <AxisRepColor.h>
Inheritance diagram for AxisRepColor:
This class uses the information kept by the AxisModelBase hierarchy objects. It communicates with the ViewBase hierarchy objects in order to get the information of the actual display. It is, therefore, carrying out adequate calculations of fonts and positions for drawing in good proportions to the axes, their labels, and the main title.
Sanket B. Malde <sanket@stanford.edu>
Oded Wurman <owurman@stanford.edu>
Definition at line 38 of file AxisRepColor.h.
Public Member Functions | |
AxisRepColor (const AxisRepColor &axis_rep) | |
The copy constructor. | |
AxisRepColor () | |
The default constructor. | |
void | beginPlot (ViewBase &view) |
Every class which draws has its beginPlot function. | |
AxisRepBase * | clone () |
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. | |
void | drawAllZTicks (const AxisModelBase &axis_model, const TransformBase &transform, ViewBase &view) |
Takes care of the z ticks drawing (i.e. | |
virtual void | drawAxesLines (TransformBase &transform, ViewBase &view, const Range &x_range, const Range &y_range) |
Draws the axes lines after transformation. | |
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. | |
void | drawZLabels (const AxisModelBase &axis_model, ViewBase &view, const std::string &z_label) |
Draws the labels of the z axis. | |
void | endPlot () |
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. | |
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_depth |
The depth of the rectangle in which the drawing is made. | |
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. | |
float | m_axis_z_origin |
The z 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. | |
Private Member Functions | |
virtual void | drawColorScale (const BinToColor &, ViewBase &) |
Draws the color scale bar. | |
void | drawZTickLabels (const AxisModelBase &axisModel, const TransformBase &transform, ViewBase &view) |
Draws the labels for the Z ticks. | |
void | drawZTickLines (const AxisModelBase &axisModel, const TransformBase &transform, ViewBase &view) |
Draws the Z tick lines. |
|
The default constructor.
Definition at line 40 of file AxisRepColor.cxx. Referenced by clone(). |
|
The copy constructor.
Definition at line 47 of file AxisRepColor.cxx. |
|
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 AxisRepBase::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.
Implements AxisRepBase. Definition at line 54 of file AxisRepColor.cxx. References 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 AxisRepBase::drawXTickLabels(), and AxisRepBase::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 AxisRepBase::drawYTickLabels(), and AxisRepBase::drawYTickLines(). Referenced by CompositePlotter::drawAxisRep(). |
|
Takes care of the z ticks drawing (i.e. , the ticks on the top of the plot). It draws the labels of the ticks which are on the top of the plot. Implements AxisRepBase. Definition at line 112 of file AxisRepColor.cxx. References drawZTickLabels(), and drawZTickLines(). |
|
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.
Reimplemented from AxisRepBase. Definition at line 238 of file AxisRepColor.cxx. References BinToColor::doubleToColor(), ViewBase::drawViewSquare(), Color::getBlue(), Color::getGreen(), HippoRectangle::getHeight(), ViewBase::getMarginRect(), BinToColor::getRange(), Color::getRed(), HippoRectangle::getWidth(), HippoRectangle::getX(), HippoRectangle::getY(), Range::length(), and Range::low(). |
|
Draws the cross hairs after transformation.
Definition at line 916 of file AxisRepBase.cxx. References ViewBase::drawLines(), BinaryTransform::isPeriodic(), AxisRepBase::m_axis_height, AxisRepBase::m_axis_width, AxisRepBase::m_axis_x_origin, AxisRepBase::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(), AxisRepBase::m_font_size, AxisRepBase::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(), AxisRepBase::m_x_font_size, AxisRepBase::m_xLabelFont, std::max(), std::min(), PLOTBOTTOM, PLOTTOP, and YPADDING(). Referenced by CompositePlotter::drawAxisRep(). |
|
|
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 AxisRepBase::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(), AxisRepBase::m_y_font_size, AxisRepBase::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(), AxisRepBase::m_font_size, and PLOTLEFT. Referenced by AxisRepBase::drawYTickLabels(). |
|
Draws the labels for the Y ticks.
Definition at line 843 of file AxisRepBase.cxx. References ViewBase::drawText(), AxisRepBase::drawYMag(), AxisModelBase::getRange(), AxisModelBase::getTicks(), Range::high(), AxisModelBase::isLog(), Range::low(), AxisRepBase::m_font_size, AxisModelBase::needPMag(), num_util::size(), std::sqrt(), BinaryTransform::transform(), ViewBase::userToDrawX(), ViewBase::userToDrawY(), XPADDING(), and YPADDING(). Referenced by AxisRepBase::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 AxisRepBase::drawAllYTicks(). |
|
Draws the labels of the z axis.
Implements AxisRepBase. Definition at line 81 of file AxisRepColor.cxx. References ViewBase::drawText(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), ViewBase::getMarginRect(), HippoRectangle::getWidth(), HippoRectangle::getX(), AxisRepBase::m_z_font_size, AxisRepBase::m_zLabelFont, std::min(), and YPADDING(). |
|
Draws the labels for the Z ticks.
Definition at line 166 of file AxisRepColor.cxx. References AxisTick::content(), ViewBase::drawText(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), ViewBase::getMarginRect(), AxisModelBase::getPMag(), AxisModelBase::getTicks(), HippoRectangle::getWidth(), HippoRectangle::getX(), HippoRectangle::getY(), AxisModelBase::isLog(), AxisRepBase::m_font_size, std::min(), AxisModelBase::needPMag(), num_util::size(), BinaryTransform::transformZ(), ViewBase::userToDrawColor(), and XPADDING(). Referenced by drawAllZTicks(). |
|
Draws the Z tick lines.
Definition at line 120 of file AxisRepColor.cxx. References ViewBase::drawViewLines(), HippoRectangle::getHeight(), AxisModelBase::getLabelLocation(), ViewBase::getMarginRect(), AxisModelBase::getTicks(), HippoRectangle::getY(), PLOTBOTTOM, PLOTTOP, num_util::size(), hippodraw::Line::Solid, BinaryTransform::transformZ(), and ViewBase::userToDrawColor(). Referenced by drawAllZTicks(). |
|
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 :). I'm sorry. Implements AxisRepBase. Definition at line 75 of file AxisRepColor.cxx. |
|
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(), AxisRepBase::m_axis_height, AxisRepBase::m_axis_width, AxisRepBase::m_axis_x_origin, and AxisRepBase::m_axis_y_origin. Referenced by AxisRepBase::beginPlot(). |
|
Sets the m_draw_axes flag to the set value.
Definition at line 105 of file AxisRepBase.cxx. References AxisRepBase::m_draw_axes. |
|
Sets the m_draw_titles flag to the set value.
Definition at line 117 of file AxisRepBase.cxx. References AxisRepBase::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(), AxisRepBase::m_font_size, std::max(), std::min(), AxisRepBase::setXFontSize(), AxisRepBase::setYFontSize(), and AxisRepBase::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 AxisRepBase::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(), AxisRepBase::m_axis_height, AxisRepBase::m_axis_y_origin, AxisRepBase::m_font_size, AxisRepBase::m_x_font_size, std::min(), PLOTBOTTOM, and PLOTTOP. Referenced by AxisRepBase::setFontSize(). |
|
Set the font tobe used to override the default while drawing X label.
Definition at line 987 of file AxisRepBase.cxx. References AxisRepBase::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(), AxisRepBase::m_axis_width, AxisRepBase::m_axis_x_origin, AxisRepBase::m_draw_titles, AxisRepBase::m_font_size, AxisRepBase::m_y_font_size, std::min(), PLOTLEFT, and PLOTRIGHT. Referenced by AxisRepBase::setFontSize(). |
|
Set the font to be used to override the default while drawing Y label.
Definition at line 1005 of file AxisRepBase.cxx. References AxisRepBase::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(), AxisRepBase::m_axis_height, AxisRepBase::m_axis_y_origin, AxisRepBase::m_font_size, AxisRepBase::m_z_font_size, std::min(), PLOTBOTTOM, and PLOTTOP. Referenced by AxisRepBase::setFontSize(). |
|
Set the font to be used to override the default while drawing Z label.
Definition at line 1023 of file AxisRepBase.cxx. References AxisRepBase::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 AxisRepBase::m_titleFont. |
|
What font is being used to override the default while drawing X label.
Definition at line 999 of file AxisRepBase.cxx. References AxisRepBase::m_xLabelFont. |
|
What font is being used to override the default while drawing Y label.
Definition at line 1017 of file AxisRepBase.cxx. References AxisRepBase::m_yLabelFont. |
|
What font is being used to override the default while drawing Z label.
Definition at line 1035 of file AxisRepBase.cxx. References AxisRepBase::m_zLabelFont. |
|
The depth of the rectangle in which the drawing is made.
Definition at line 47 of file AxisRepColor.h. |
|
The height of the rectangle in which the drawing is made.
Definition at line 69 of file AxisRepBase.h. Referenced by AxisRepBase::drawCrossHairs(), AxisRepBase::initAxisRect(), AxisRepBase::setXFontSize(), and AxisRepBase::setZFontSize(). |
|
The width of the rectangle in which the drawing is made.
Definition at line 66 of file AxisRepBase.h. Referenced by AxisRepBase::drawCrossHairs(), AxisRepBase::initAxisRect(), and AxisRepBase::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 AxisRepBase::drawCrossHairs(), AxisRepBase::initAxisRect(), and AxisRepBase::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 AxisRepBase::drawCrossHairs(), AxisRepBase::initAxisRect(), AxisRepBase::setXFontSize(), and AxisRepBase::setZFontSize(). |
|
The z coordinate of the origin of the coordinate system.
Definition at line 44 of file AxisRepColor.h. |
|
The following flag indicates whether the axes have to be drawn or not.
Definition at line 101 of file AxisRepBase.h. Referenced by AxisRepBase::setDrawAxes(). |
|
The following flag indicates whether the titles have to be drawn or not.
Definition at line 105 of file AxisRepBase.h. Referenced by AxisRepBase::setDrawTitles(), and AxisRepBase::setYFontSize(). |
|
Font size for the tick labels.
Definition at line 73 of file AxisRepBase.h. Referenced by AxisRepBase::drawTitle(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawYMag(), AxisRepBase::drawYTickLabels(), drawZTickLabels(), AxisRepBase::setFontSize(), AxisRepBase::setXFontSize(), AxisRepBase::setYFontSize(), and AxisRepBase::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 AxisRepBase::drawTitle(), AxisRepBase::setTitleFont(), AxisRepBase::titleFont(), and AxisRepBase::~AxisRepBase(). |
|
Font size for X axis label.
Definition at line 77 of file AxisRepBase.h. Referenced by AxisRepBase::drawXLabels(), and AxisRepBase::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 AxisRepBase::drawXLabels(), AxisRepBase::setXLabelFont(), AxisRepBase::xLabelFont(), and AxisRepBase::~AxisRepBase(). |
|
Font size for the Y axis label.
Definition at line 81 of file AxisRepBase.h. Referenced by AxisRepBase::drawYLabels(), and AxisRepBase::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 AxisRepBase::drawYLabels(), AxisRepBase::setYLabelFont(), AxisRepBase::yLabelFont(), and AxisRepBase::~AxisRepBase(). |
|
Font size for the Z axis label.
Definition at line 85 of file AxisRepBase.h. Referenced by drawZLabels(), and AxisRepBase::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 drawZLabels(), AxisRepBase::setZLabelFont(), AxisRepBase::zLabelFont(), and AxisRepBase::~AxisRepBase(). |