#include <EpsView.h>
Inheritance diagram for EpsView:
Definition at line 27 of file EpsView.h.
Public Member Functions | |
virtual void | drawColorLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const std::vector< Color > &color, float size) |
Draws multiple line segments, each with a different color - that is, a line between x0,y0 and x1,y1, with color[0] =color[1] another between x2,y2 and x3,y3 with color[2]=color[3] and so on. | |
virtual void | drawLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const Color &color, float size) |
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2,y2 and x3,y3 and so on. | |
virtual void | drawMag (float x, float y, int mag, float fontsize) |
Draws the exponent on the axis label. | |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, const std::vector< Color > &colors, hippodraw::Symbol::Type type, float sym_size) |
Draws symbol points. | |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Symbol::Type type, float sym_size, const Color &color) |
Draws symbol points. | |
virtual void | drawPolyLine (const std::vector< double > &xpoints, const std::vector< double > &ypoints, hippodraw::Line::Style style, const Color &color, float size) |
Draws a polyline. | |
virtual void | drawSelf () |
Draws itself. | |
virtual void | drawSquare (double x1, double y1, double x2, double y2, int red, int green, int blue) |
Draws a colored square. | |
virtual void | drawText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize, const FontBase *font) |
Draws a text string at a point in the view's coordinate system. | |
virtual void | drawUserText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp) |
Draws a text string at a point in the data coordinate system. | |
virtual void | drawViewLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const Color &color, float size) |
Draws multiple line segments. | |
virtual void | drawViewLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, bool color, float size) |
Draws multiple line segments. | |
virtual void | drawViewSquare (float x1, float y1, float x2, float y2, int red, int green, int blue) |
Draws a colored square in view space. | |
virtual void | endPlot () |
Finalizes a view when all drawing has been done. | |
EpsView (const std::string file, double x, double y, double w, double h) | |
Creates an EpsView attached to file with a bounding rectangle. | |
virtual double | getAspectRatio () const |
Get the aspect ratio. | |
virtual HippoRectangle | getDrawRect () const |
Returns the drawing Rectangle in the devices coordinate system. | |
virtual HippoRectangle | getMarginRect () const |
Returns the Rectangle within which points representations are draw. | |
PlotterBase * | getPlotter () |
Returns the plotter used by this view. | |
PlotterBase * | getPlotter () const |
Returns the plotter used by this view. | |
const Range & | getRange (hippodraw::Axes::Type axis) const |
Returns the range of the data space on specified axis. | |
const HippoRectangle & | getUserRect () const |
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where the drawing is made. | |
virtual void | initPlot (double aspect) |
This method does nothing as the generated EPS file should draw like it appears on the canvas. | |
virtual void | setDrawRect (float x, float y, float w, float h) |
Sets the drawing Rectangle in the devices coordinate system. | |
virtual void | setPlotter (PlotterBase *plotter) |
Sets the PlotterBase object to plotter. | |
float | toViewX (double datX) const |
float | toViewY (double datY) const |
float | toX (double x) const |
float | toY (double y) const |
virtual void | update (const Observable *) |
Implements the update method of the Observer pattern. | |
float | userToDrawColor (double c) const |
Converts a coordinate in user space to drawing space along the color (X) axis. | |
float | userToDrawX (double x) const |
Converts a coordinate in user space to drawing space along the X axis. | |
float | userToDrawY (double x) const |
Converts a coordinate in user space to drawing space along the Y axis. | |
virtual void | willDelete (const Observable *) |
Notifies this Observer object that one of its Observable objects is about to be deleted. | |
virtual | ~EpsView () |
Protected Attributes | |
PlotterBase * | m_plotter |
The plotter object used by this view. | |
Private Member Functions | |
virtual void | draw_Text (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, const FontBase *) |
EpsView (const EpsView &) | |
void | initPlot (const std::string &filename, double x, double y, double w, double h) |
Initializes data for the EPS file generation. | |
Private Attributes | |
HippoRectangle | m_boundingRect |
HippoRectangle | m_draw_rect |
std::ofstream | m_outfile |
|
|
|
Creates an EpsView attached to file with a bounding rectangle.
Definition at line 38 of file EpsView.cxx. References initPlot(). |
|
Definition at line 45 of file EpsView.cxx. References m_outfile. |
|
Definition at line 667 of file EpsView.cxx. References m_outfile, and num_util::size(). Referenced by drawText(), and drawUserText(). |
|
Draws multiple line segments, each with a different color - that is, a line between x0,y0 and x1,y1, with color[0] =color[1] another between x2,y2 and x3,y3 with color[2]=color[3] and so on.
Implements ViewBase. Definition at line 152 of file EpsView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), m_outfile, hippodraw::Line::Solid, toViewX(), and toViewY(). |
|
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2,y2 and x3,y3 and so on.
Implements ViewBase. Definition at line 101 of file EpsView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), m_outfile, hippodraw::Line::Solid, toViewX(), and toViewY(). |
|
Draws the exponent on the axis label. The arguments stand for the starting position of the writing ( x, y ), for the value of the magnitude ( mag ), and for the font ( fontsize ).
Implements ViewBase. Definition at line 638 of file EpsView.cxx. References HippoRectangle::getX(), HippoRectangle::getY(), m_boundingRect, m_draw_rect, m_outfile, and toY(). |
|
Draws symbol points. x and y are the coordinates, type is the type of symbol, and sym_size is the size. hue is the hue parameters for each point. The saturation and brightness are set to 1.0. Implements ViewBase. Definition at line 525 of file EpsView.cxx. References hippodraw::Symbol::CIRCLE, hippodraw::Symbol::FILLED_CIRCLE, hippodraw::Symbol::FILLED_TRIANGLE, Color::getBlue(), Color::getGreen(), Color::getRed(), m_outfile, hippodraw::Symbol::PLUS, hippodraw::Symbol::SOLIDSQUARE, hippodraw::Symbol::SQUARE, hippodraw::Symbol::TIMES, toViewX(), toViewY(), and hippodraw::Symbol::TRIANGLE. |
|
Draws symbol points. x and y are the coordinates, type is the type of symbol, and sym_size is the size. All symbols are draw in the same color. Implements ViewBase. Definition at line 417 of file EpsView.cxx. References hippodraw::Symbol::CIRCLE, hippodraw::Symbol::FILLED_CIRCLE, hippodraw::Symbol::FILLED_TRIANGLE, Color::getBlue(), Color::getGreen(), Color::getRed(), m_outfile, hippodraw::Symbol::PLUS, hippodraw::Symbol::SOLIDSQUARE, hippodraw::Symbol::SQUARE, hippodraw::Symbol::TIMES, toViewX(), toViewY(), and hippodraw::Symbol::TRIANGLE. |
|
Draws a polyline.
Implements ViewBase. Definition at line 301 of file EpsView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::DashDotDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), hippodraw::FontWeight::Invisible, m_outfile, hippodraw::Line::Solid, toViewX(), and toViewY(). |
|
Draws itself.
Definition at line 60 of file ViewBase.cxx. References PlotterBase::drawIn(), and ViewBase::m_plotter. Referenced by QtViewWidget::draw(), QtView::draw(), QtView::drawWithPixmap(), OpenGLWindow::paint(), and QtViewWidget::paintEvent(). |
|
Draws a colored square. Used for shading on the cuts and the gray plot. Implements ViewBase. Definition at line 361 of file EpsView.cxx. |
|
Draws a text string at a point in the view's coordinate system.
Implements ViewBase. Definition at line 725 of file EpsView.cxx. References draw_Text(), m_outfile, toX(), and toY(). |
|
Draws a text string at a point in the data coordinate system.
Implements ViewBase. Definition at line 654 of file EpsView.cxx. References draw_Text(), m_outfile, toViewX(), and toViewY(). |
|
Draws multiple line segments.
Implements ViewBase. Definition at line 251 of file EpsView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), m_outfile, hippodraw::Line::Solid, toX(), and toY(). |
|
Draws multiple line segments.
Implements ViewBase. Definition at line 206 of file EpsView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, m_outfile, hippodraw::Line::Solid, toX(), and toY(). |
|
Draws a colored square in view space. Used for shading on the cuts and the gray plot. Implements ViewBase. Definition at line 389 of file EpsView.cxx. |
|
Finalizes a view when all drawing has been done.
Implements ViewBase. Definition at line 96 of file EpsView.cxx. References m_outfile. |
|
Get the aspect ratio.
Definition at line 85 of file ViewBase.cxx. References ViewBase::m_plotter. Referenced by CanvasView::contentsMouseMoveEvent(), and QtView::drawWithPixmap(). |
|
Returns the drawing Rectangle in the devices coordinate system. Must be implemented in derived class. Implements ViewBase. Definition at line 756 of file EpsView.cxx. References m_draw_rect. |
|
Returns the Rectangle within which points representations are draw.
Reimplemented in QtViewImp. Definition at line 80 of file ViewBase.cxx. References PlotterBase::getMarginRect(), and ViewBase::m_plotter. Referenced by AxisRepColor::drawColorScale(), ContourPointRep::drawContourTicks(), AxisRepBase::drawTitle(), AxisRepBase::drawXLabels(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYLabels(), AxisRepBase::drawYMag(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZLabels(), AxisRepColor::drawZTickLabels(), and AxisRepColor::drawZTickLines(). |
|
Returns the plotter used by this view.
Definition at line 55 of file ViewBase.cxx. References ViewBase::m_plotter. |
|
Returns the plotter used by this view.
Reimplemented in OpenGLView. Definition at line 50 of file ViewBase.cxx. References ViewBase::m_plotter. Referenced by DisplayController::addTextViewToList(), ViewBaseXML::areDataSourcesSaved(), CutController::connectDataRep(), CanvasView::controlMousePressEvent(), ViewBaseXML::createChild(), CanvasView::fillPlotterList(), CutController::fillTupleCutList(), PyCanvas::findSelectedView(), PyCanvas::getDisplays(), OpenGLView::getPlotter(), CanvasView::getViewFor(), PlotTable::initialize(), DisplayController::removeTextObservers(), PyCanvas::saveAsImage(), CanvasView::saveSelectedAsEps(), CanvasView::setIntervalEnabled(), and CanvasView::viewShowPickTable(). |
|
Returns the range of the data space on specified axis.
Definition at line 68 of file ViewBase.cxx. References ViewBase::m_plotter. Referenced by ContourPointRep::drawContourTicks(). |
|
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where the drawing is made.
Definition at line 75 of file ViewBase.cxx. References PlotterBase::getUserRect(), and ViewBase::m_plotter. Referenced by ContourPointRep::endPlot(), and AxisRepBase::initAxisRect(). |
|
This method does nothing as the generated EPS file should draw like it appears on the canvas.
Implements ViewBase. Definition at line 50 of file EpsView.cxx. |
|
Initializes data for the EPS file generation. filename is the name of the file. The x, y, w, and h are the x, y, width and height of the bounding rectangle. Definition at line 58 of file EpsView.cxx. References m_outfile. Referenced by EpsView(). |
|
Sets the drawing Rectangle in the devices coordinate system.
Implements ViewBase. Definition at line 762 of file EpsView.cxx. References m_draw_rect, and HippoRectangle::setRect(). |
|
Sets the PlotterBase object to plotter. The ViewBase object does not own the plotter. If the plotter is being changed, it is up to client code to decide to destroy the previous plotter or not. Reimplemented in OpenGLView, and QtViewWidget. Definition at line 45 of file ViewBase.cxx. References ViewBase::m_plotter. Referenced by QtViewWidget::setPlotter(), and OpenGLView::setPlotter(). |
|
Definition at line 767 of file EpsView.cxx. References HippoRectangle::getX(), m_boundingRect, m_draw_rect, ViewBase::m_plotter, and PlotterBase::userToMarginX(). Referenced by drawColorLines(), drawLines(), drawPoints(), drawPolyLine(), drawSquare(), and drawUserText(). |
|
Definition at line 774 of file EpsView.cxx. References HippoRectangle::getHeight(), PlotterBase::getMarginRect(), HippoRectangle::getY(), m_boundingRect, m_draw_rect, ViewBase::m_plotter, and PlotterBase::userToMarginY(). Referenced by drawColorLines(), drawLines(), drawPoints(), drawPolyLine(), drawSquare(), and drawUserText(). |
|
Definition at line 796 of file EpsView.cxx. References HippoRectangle::getX(), m_boundingRect, and m_draw_rect. Referenced by drawText(), drawViewLines(), and drawViewSquare(). |
|
Definition at line 803 of file EpsView.cxx. References HippoRectangle::getHeight(), HippoRectangle::getY(), m_boundingRect, and m_draw_rect. Referenced by drawMag(), drawText(), drawViewLines(), and drawViewSquare(). |
|
Implements the update method of the Observer pattern. Derived classes should send a message to what ever object is the parent of this ViewBase object. Implements ViewBase. Definition at line 736 of file EpsView.cxx. |
|
Converts a coordinate in user space to drawing space along the color (X) axis.
Implements ViewBase. Definition at line 750 of file EpsView.cxx. References ViewBase::m_plotter, and PlotterBase::userToMarginColor(). |
|
Converts a coordinate in user space to drawing space along the X axis.
Implements ViewBase. Definition at line 740 of file EpsView.cxx. References ViewBase::m_plotter. |
|
Converts a coordinate in user space to drawing space along the Y axis.
Implements ViewBase. Definition at line 745 of file EpsView.cxx. References ViewBase::m_plotter, and PlotterBase::userToInvertedMarginY(). |
|
Notifies Since most Observable objects are owned by its Observer, it is the Observer that issued the delete. Thus the default implementation here does nothing. Derived classes that observe objects owned by another should implement this method to remove the Observable from the list they are observing. Reimplemented in FunctionRep, DataSourceController, CutPlotter, TextPlotter, BinningProjector, DyHist1DProjector, DyHist2DProjector, NTupleProjector, Profile2DProjector, and ProfileProjector. Definition at line 25 of file Observer.cxx. Referenced by DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple(). |
|
Definition at line 34 of file EpsView.h. Referenced by drawMag(), toViewX(), toViewY(), toX(), and toY(). |
|
Definition at line 36 of file EpsView.h. Referenced by drawMag(), getDrawRect(), setDrawRect(), toViewX(), toViewY(), toX(), and toY(). |
|
Definition at line 32 of file EpsView.h. Referenced by draw_Text(), drawColorLines(), drawLines(), drawMag(), drawPoints(), drawPolyLine(), drawSquare(), drawText(), drawUserText(), drawViewLines(), drawViewSquare(), endPlot(), initPlot(), and ~EpsView(). |
|
The plotter object used by this view. Although the plotter object was created externally, the view owns the plotter object. Definition at line 66 of file ViewBase.h. Referenced by QtView::draw(), ViewBase::drawSelf(), QtViewWidget::fillPickedPoint(), QtView::fillPickedPoint(), ViewBase::getAspectRatio(), ViewBase::getMarginRect(), QtViewImp::getMarginRect(), ViewBase::getPlotter(), ViewBase::getRange(), ViewBase::getUserRect(), QtViewWidget::mousePressEvent(), QtViewWidget::paintEvent(), QtView::QtView(), QtViewImp::setCrossX(), QtViewImp::setCrossY(), ViewBase::setPlotter(), QtViewWidget::toViewX(), QtView::toViewX(), OpenGLView::toViewX(), toViewX(), QtViewWidget::toViewY(), QtView::toViewY(), OpenGLView::toViewY(), toViewY(), QtViewImp::userToDrawColor(), OpenGLView::userToDrawColor(), userToDrawColor(), QtViewImp::userToDrawX(), OpenGLView::userToDrawX(), userToDrawX(), QtViewImp::userToDrawY(), OpenGLView::userToDrawY(), userToDrawY(), and QtView::~QtView(). |