14 #include "msdevstudio/MSconfig.h"
33 using namespace hippodraw;
41 m_line_style( Line::
Solid ),
49 m_line_style ( point_rep.m_line_style ),
50 m_y_flag ( point_rep.m_y_flag )
112 namespace dp = hippodraw::DataPoint2DTuple;
125 unsigned int size = ntuple -> rows ();
126 unsigned int reserve = 2 * ( size + 1 );
128 m_x.reserve ( reserve );
129 m_y.reserve ( reserve );
133 const Rect & user_rect = view -> getUserRect ();
135 for (
unsigned int i = 0; i <
size; i ++ ) {
136 const vector < double > & row = ntuple -> getRow ( i );
137 double x = row [
dp::X ];
140 m_x.push_back ( x - hw );
141 m_y.push_back ( 0.0 );
143 m_x.push_back ( x -hw );
146 m_x.push_back ( last_x );
148 double y = row [
dp::Y ];
156 m_x.push_back ( last_x );
162 m_y.push_back ( 0.0 );
163 assert (
m_x.size() ==
m_y.size() );
165 t -> transform (
m_x,
m_y );
The abstract base class for views.
std::vector< double > m_y
A cache of the points to be drawn along the Y axis.
Style
Line style constants.
A PointRep class that draws a column to represent the value.
hippodraw::ColumnPointRep class interface
virtual void drawValues(ViewBase *view) const
Does the drawing based on the accumulated polyline.
virtual RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
void setYError(bool)
Sets the flag to plot the errors on the Y axis.
hippodraw::DataPointTuple namespace interface
~ColumnPointRep()
The destructor.
The base class for the point representation hierarchy.
Base class for DataSource.
A rep to draw error bars, owned by point reps.
hippodraw::ViewBase class interface
virtual void setSize(float value)
Sets the size of the line drawing and that of the error bar.
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
The base class for the point representation hierarchy.
hippodraw::BinaryTransform class interface
virtual void setStyle(unsigned int style)
Sets the style of the line drawing.
virtual const Color & color() const
Returns the representation's color.
bool m_y_flag
The Y error flag.
virtual void setErrorOn(hippodraw::Axes::Type axis, bool yes=true)
Sets the error display on or off.
hippodraw::ErrorBarRep class interface
RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
ColumnPointRep()
The default constructor.
A transform that transforms coordinates from one 2D coordinate system to another. ...
float m_size
The size of the representation.
virtual unsigned int getStyle() const
Returns the style of the line drawing.
hippodraw::Line::Style m_line_style
The style currently used.
virtual void setColor(const Color &color)
Sets the Color.
float size() const
Returns the size of the representation.
virtual bool uses(hippodraw::Line::Style) const
Returns true as this class uses hippodraw::Line::Style.
std::vector< double > m_x
A cache of the points to be drawn along the X axis.
Style convert(unsigned int style)
A Color class for creating the color object following the standard RGB color space.
virtual void setSize(float value)
Sets the size of the representation.
hippodraw::DataSource class interface.
Class representing a rectangle.
error on X or half bin width
virtual void setColor(const Color &)
Sets the color of the representation.
void makeInBounds(double &x, double &y) const
Changes the coordinates so that they are inside or on the boundary of the rectangle.
A transform that transforms coordinates from one coordinate system to another.
ErrorBarRep * m_error_rep
The error bar representation.