#include <LineFunctionRep.h>
Inheritance diagram for LinePointRep:
The variety of styles available are enumerated in the enum
LineStyle
.
Paul F. Kunz <paul_kunz@slac.stanford.edu>
Oded Wurman <owurman@stanford.edu>
Definition at line 34 of file LineFunctionRep.h.
Public Member Functions | |
virtual RepBase * | clone () |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
virtual RepBase * | clone () |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
virtual const Color & | color () const |
Returns the representation's color. | |
virtual void | displayError (ViewBase &view) |
Display an error message. | |
virtual void | drawProjectedValues (const DataSource *ntuple, TransformBase *transform, ViewBase *view) |
Draws the projected values. | |
virtual void | drawProjectedValues (const DataSource *ntuple, TransformBase *transform, ViewBase *view) |
Draws the projected values. | |
virtual const Color & | getColor () const |
Get the color of the representation. | |
virtual unsigned int | getStyle () const |
Returns the style of the line drawing. | |
virtual unsigned int | getStyle () const |
Returns the style of the line drawing. | |
virtual const BinToColor * | getValueTransform () const |
Returns the value transform. | |
virtual bool | isSelected () const |
Returns true if representation is in selected state, otherwise returns false . | |
LinePointRep (const LinePointRep &point_rep) | |
The copy constructor. | |
LinePointRep (float size) | |
Constructor that takes size as argument. | |
LinePointRep () | |
The default constructor. | |
LinePointRep (const LinePointRep &point_rep) | |
The copy constructor. | |
LinePointRep (float size) | |
Constructor that takes size as argument. | |
LinePointRep () | |
The default constructor. | |
const std::string & | name () const |
Returns the name of the representation. | |
virtual void | setColor (const Color &) |
Sets the color of the representation. | |
virtual void | setErrorOn (const std::string &axis, bool yes=true) |
Sets the error representation on specified axis, if any, to yes. | |
virtual void | setHighLighted (bool yes) |
Sets the highlighted state of the point representation. | |
virtual void | setSelected (bool yes) |
Sets the selection state of the representation. | |
void | setSize (float value) |
Sets the size of the representation. | |
virtual void | setStyle (unsigned int style) |
Sets the style of the line drawing. | |
virtual void | setStyle (unsigned int style) |
Sets the style of the line drawing. | |
void | setText (const std::string &text) |
Sets the text. | |
virtual void | setValueTransform (BinToColor *) |
Sets the value transform. | |
float | size () const |
Returns the size of the representation. | |
virtual bool | xError () const |
Returns true if the point representation displays error on the X axis. | |
virtual bool | yError () const |
Returns true if the point representation displays error on the Y axis. | |
virtual | ~LinePointRep () |
The destructor. | |
virtual | ~LinePointRep () |
The destructor. | |
Protected Attributes | |
Color | m_color |
The color of the representation. | |
bool | m_desel |
A flag to indicate the representation is de-selected. | |
ErrorBarRep * | m_error_rep |
The error bar representation. | |
bool | m_highlite |
Sets the state of highlighting. | |
hippodraw::Line::Style | m_line_style |
The style currently used. | |
std::string | m_name |
The name of the representation. | |
float | m_size |
The size of the representation. | |
std::string | m_text |
The text to be displayed before the statistics. | |
std::vector< double > | m_x |
A cache of the points along the X axis to be drawn. | |
std::vector< double > | m_y |
A cache of the points along the Y axis to be drawn. | |
Static Protected Attributes | |
static const Color | s_desel_color |
The color of the representation when it is de-selected. | |
Private Member Functions | |
void | addEndPoints (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, std::vector< double > &x, std::vector< double > &y) const |
void | addEndPoints (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, std::vector< double > &x, std::vector< double > &y) const |
bool | cornerCase (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, std::vector< double > &x, std::vector< double > &y) const |
bool | cornerCase (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, std::vector< double > &x, std::vector< double > &y) const |
void | findEndPoints (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2) const |
void | findEndPoints (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2) const |
double | interpolate (double x, std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy) const |
double | interpolate (double x, std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy) const |
bool | outside_box (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy) const |
bool | outside_box (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy) const |
double | separation (const Point &pt1, const Point &pt2) const |
double | separation (const Point &pt1, const Point &pt2) const |
bool | straddles_x_boundary (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2, double &distance) const |
bool | straddles_x_boundary (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2, double &distance) const |
bool | straddles_y_boundary (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2, double &distance) const |
bool | straddles_y_boundary (std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2, double &distance) const |
Private Attributes | |
const HippoRectangle * | m_user_rect |
const HippoRectangle * | m_user_rect |
double | m_xmax |
double | m_xmin |
double | m_ymax |
double | m_ymin |
|
The default constructor.
Definition at line 34 of file LineFunctionRep.cxx. Referenced by clone(). |
|
Constructor that takes size as argument.
Definition at line 40 of file LineFunctionRep.cxx. |
|
The copy constructor.
Definition at line 46 of file LineFunctionRep.cxx. |
|
The destructor.
Definition at line 52 of file LineFunctionRep.cxx. |
|
The default constructor.
|
|
Constructor that takes size as argument.
|
|
The copy constructor.
|
|
The destructor.
|
|
|
|
Definition at line 248 of file LineFunctionRep.cxx. References findEndPoints(), Point::getX(), Point::getY(), HippoRectangle::isInBounds(), and m_user_rect. Referenced by drawProjectedValues(). |
|
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implements PointRepBase. Reimplemented in ContourPointRep. |
|
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implements PointRepBase. Reimplemented in ContourPointRep. Definition at line 56 of file LineFunctionRep.cxx. References LinePointRep(). |
|
Returns the representation's color.
Definition at line 61 of file RepBase.cxx. References RepBase::m_color, RepBase::m_desel, and RepBase::s_desel_color. Referenced by ContourPointRep::createContours(), SymbolPointRep::drawProjectedValues(), drawProjectedValues(), ErrorBarRep::drawProjectedValues(), ColumnPointRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), and DataRep::getRepColor(). |
|
|
|
Definition at line 285 of file LineFunctionRep.cxx. References Point::getX(), Point::getY(), HippoRectangle::isInBounds(), m_user_rect, m_xmax, m_xmin, m_ymax, m_ymin, straddles_x_boundary(), and straddles_y_boundary(). Referenced by drawProjectedValues(). |
|
Display an error message. Display an error message instead of drawing a point. This base class implementation displays a message with the name of the RepBase object. Definition at line 153 of file RepBase.cxx. References ViewBase::drawText(), RepBase::m_name, and RepBase::m_size. |
|
Draws the projected values. Draws the projected values contained in the DataSource ntuple. Each row of the ntuple is data point tuple of some dimension. Derived classes expect the DataSoruce to be of the correct dimension. The drawn points undergo a transform represented by transform and are drawn to the view view. If highlighting is on, uses the ranges to control highlighting. Implements RepBase. Reimplemented in ContourPointRep. |
|
Draws the projected values. Draws the projected values contained in the DataSource ntuple. Each row of the ntuple is data point tuple of some dimension. Derived classes expect the DataSoruce to be of the correct dimension. The drawn points undergo a transform represented by transform and are drawn to the view view. If highlighting is on, uses the ranges to control highlighting. Implements RepBase. Reimplemented in ContourPointRep. Definition at line 79 of file LineFunctionRep.cxx. References addEndPoints(), RepBase::color(), cornerCase(), HippoRectangle::getHeight(), HippoRectangle::getWidth(), HippoRectangle::getX(), HippoRectangle::getY(), m_line_style, RepBase::m_size, m_user_rect, m_x, m_xmax, m_xmin, m_y, m_ymax, m_ymin, outside_box(), RepBase::size(), hippodraw::Axes::X, and hippodraw::Axes::Y. |
|
|
|
Definition at line 263 of file LineFunctionRep.cxx. References Point::setPoint(), straddles_x_boundary(), and straddles_y_boundary(). Referenced by addEndPoints(). |
|
Get the color of the representation.
Definition at line 56 of file RepBase.cxx. References RepBase::m_color. Referenced by PointRepXML::createElement(). |
|
Returns the style of the line drawing.
Reimplemented from RepBase. |
|
Returns the style of the line drawing.
Reimplemented from RepBase. Definition at line 70 of file LineFunctionRep.cxx. References m_line_style. |
|
Returns the value transform. A value transform changes a binary value to some graphical representations such as color. The implementation in this base class returns a null pointer. Derived classes that implement value transform should return a pointer to the object it uses. Reimplemented in ColorBoxPointRep, ColorSymbolPointRep, and ContourPointRep. Definition at line 139 of file RepBase.cxx. Referenced by PointRepXML::createElement(). |
|
|
|
Definition at line 236 of file LineFunctionRep.cxx. Referenced by straddles_x_boundary(), and straddles_y_boundary(). |
|
Returns
Definition at line 77 of file RepBase.cxx. References RepBase::m_desel. Referenced by DataRep::isSelected(). |
|
Returns the name of the representation. This name might be used by a Factory. Definition at line 45 of file RepBase.cxx. References RepBase::m_name. Referenced by FuncParmRep::drawProjectedValues(), PointRepXML::setAttributes(), QtDisplay::setContourLevels(), and Inspector::updatePlotTab(). |
|
|
|
Definition at line 151 of file LineFunctionRep.cxx. References m_xmax, m_xmin, m_ymax, and m_ymin. Referenced by drawProjectedValues(), straddles_x_boundary(), and straddles_y_boundary(). |
|
|
|
Definition at line 242 of file LineFunctionRep.cxx. References Point::getX(), Point::getY(), and std::sqrt(). Referenced by straddles_x_boundary(), and straddles_y_boundary(). |
|
Sets the color of the representation.
Reimplemented in ColumnPointRep, and SymbolPointRep. Definition at line 51 of file RepBase.cxx. References RepBase::m_color. Referenced by PointRepXML::createObject(), CutRangeRep::CutRangeRep(), FunctionRep::FunctionRep(), LineDataRep::LineDataRep(), SymbolPointRep::setColor(), ColumnPointRep::setColor(), and DataRep::setRepColor(). |
|
Sets the error representation on specified axis, if any, to yes.
Reimplemented in ColumnPointRep, and SymbolPointRep. Definition at line 128 of file RepBase.cxx. Referenced by PointRepXML::createObject(), and DataRep::setErrorDisplay(). |
|
Sets the highlighted state of the point representation. If yes is true, then the point representation should show the non highlighted regions in some fashion, typically using light gray color instead of its normal color.
Definition at line 84 of file RepBase.cxx. References RepBase::m_highlite. |
|
Sets the selection state of the representation.
Also sets the selection state of the ErrorBarRep representation, if any. If yes is Reimplemented from RepBase. Definition at line 36 of file PointRepBase.cxx. References PointRepBase::m_error_rep, and RepBase::setSelected(). |
|
Sets the size of the representation.
Definition at line 94 of file RepBase.cxx. References RepBase::m_size. Referenced by PointRepXML::createObject(), FunctionRep::FunctionRep(), and DataRep::setRepSize(). |
|
Sets the style of the line drawing.
Reimplemented from RepBase. |
|
Sets the style of the line drawing.
Reimplemented from RepBase. Definition at line 63 of file LineFunctionRep.cxx. References hippodraw::Axes::convert(), and m_line_style. |
|
Sets the text.
Definition at line 132 of file RepBase.cxx. References RepBase::m_text. Referenced by DisplayController::createTextDataRep(). |
|
Sets the value transform. The implementation in this base class does nothing. Derived classes that implement a value transform should override this method and take possession of the received object.
Reimplemented in ColorBoxPointRep, ColorSymbolPointRep, and ContourPointRep. Definition at line 146 of file RepBase.cxx. |
|
Returns the size of the representation.
Definition at line 89 of file RepBase.cxx. References RepBase::m_size. Referenced by ContourPointRep::createContours(), ContourPointRep::drawContourTicks(), SymbolPointRep::drawProjectedValues(), drawProjectedValues(), ErrorBarRep::drawProjectedValues(), ContourPointRep::drawProjectedValues(), ColumnPointRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), DisplayController::pointSize(), and PointRepXML::setAttributes(). |
|
|
|
Definition at line 160 of file LineFunctionRep.cxx. References interpolate(), m_xmax, m_xmin, outside_box(), separation(), and Point::setPoint(). Referenced by cornerCase(), and findEndPoints(). |
|
|
|
Definition at line 198 of file LineFunctionRep.cxx. References interpolate(), m_ymax, m_ymin, outside_box(), separation(), and Point::setPoint(). Referenced by cornerCase(), and findEndPoints(). |
|
Returns true if the point representation displays error on the X axis.
The default implementation returns Reimplemented in SymbolPointRep. Definition at line 114 of file RepBase.cxx. Referenced by DataRep::isErrorDisplayed(), and PointRepXML::setAttributes(). |
|
Returns true if the point representation displays error on the Y axis.
The default implementation returns Reimplemented in ColumnPointRep, and SymbolPointRep. Definition at line 120 of file RepBase.cxx. Referenced by DataRep::isErrorDisplayed(), and PointRepXML::setAttributes(). |
|
The color of the representation.
Definition at line 55 of file RepBase.h. Referenced by RepBase::color(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), RepBase::getColor(), and RepBase::setColor(). |
|
A flag to indicate the representation is de-selected.
Definition at line 64 of file RepBase.h. Referenced by RepBase::color(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), ColorBoxPointRep::drawProjectedValues(), RepBase::isSelected(), and RepBase::setSelected(). |
|
The error bar representation. Will be a null pointer if a derived class doesn't have one. Definition at line 42 of file PointRepBase.h. Referenced by ColumnPointRep::ColumnPointRep(), SymbolPointRep::drawProjectedValues(), ColumnPointRep::drawProjectedValues(), SymbolPointRep::setColor(), ColumnPointRep::setColor(), SymbolPointRep::setErrorOn(), ColumnPointRep::setErrorOn(), PointRepBase::setSelected(), SymbolPointRep::SymbolPointRep(), ColumnPointRep::~ColumnPointRep(), and SymbolPointRep::~SymbolPointRep(). |
|
Sets the state of highlighting.
Definition at line 68 of file RepBase.h. Referenced by RepBase::setHighLighted(). |
|
The style currently used.
Definition at line 94 of file LinePointRep.h. Referenced by drawProjectedValues(), ContourPointRep::endPlot(), getStyle(), and setStyle(). |
|
The name of the representation.
Definition at line 49 of file RepBase.h. Referenced by AverageTextRep::AverageTextRep(), ColorSymbolPointRep::ColorSymbolPointRep(), RepBase::displayError(), ContourPointRep::init(), and RepBase::name(). |
|
|
The text to be displayed before the statistics.
Definition at line 52 of file RepBase.h. Referenced by BoxTextRep::drawProjectedValues(), and RepBase::setText(). |
|
Definition at line 42 of file LinePointRep.h. |
|
Definition at line 42 of file LineFunctionRep.h. Referenced by addEndPoints(), cornerCase(), and drawProjectedValues(). |
|
A cache of the points along the X axis to be drawn. For efficiency, all line segments are sent once to the view. However, the x and y points are kept separate so that they can be transformed separately. LinePointRep builds a cache for efficiency. Definition at line 82 of file LinePointRep.h. Referenced by ContourPointRep::createContours(), drawProjectedValues(), ContourPointRep::drawProjectedValues(), and ContourPointRep::endPlot(). |
|
Definition at line 40 of file LinePointRep.h. Referenced by cornerCase(), drawProjectedValues(), outside_box(), and straddles_x_boundary(). |
|
Definition at line 40 of file LinePointRep.h. Referenced by cornerCase(), drawProjectedValues(), outside_box(), and straddles_x_boundary(). |
|
A cache of the points along the Y axis to be drawn. For efficiency, all line segments are sent once to the view. However, the x and y points are kept separate so that they can be transformed separately. LinePointRep builds a cache for efficiency. Definition at line 90 of file LinePointRep.h. Referenced by ContourPointRep::createContours(), drawProjectedValues(), ContourPointRep::drawProjectedValues(), and ContourPointRep::endPlot(). |
|
Definition at line 40 of file LinePointRep.h. Referenced by cornerCase(), drawProjectedValues(), outside_box(), and straddles_y_boundary(). |
|
Definition at line 40 of file LinePointRep.h. Referenced by cornerCase(), drawProjectedValues(), outside_box(), and straddles_y_boundary(). |
|
The color of the representation when it is de-selected.
Referenced by RepBase::color(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), and CutRangeRep::drawNormalRange(). |