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 );
hippodraw::Line::Style m_line_style
The style currently used.
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
void makeInBounds(double &x, double &y) const
Changes the coordinates so that they are inside or on the boundary of the rectangle.
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
hippodraw::ErrorBarRep class interface
A transform that transforms coordinates from one coordinate system to another.
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.
void setYError(bool)
Sets the flag to plot the errors on the Y axis.
virtual unsigned int getStyle() const
Returns the style of the line drawing.
Style convert(unsigned int style)
A Color class for creating the color object following the standard RGB color space.
hippodraw::DataSource class interface.
virtual void setColor(const Color &color)
Sets the Color.
error on X or half bin width
hippodraw::BinaryTransform class interface
virtual bool uses(hippodraw::Line::Style) const
Returns true as this class uses hippodraw::Line::Style.
virtual void drawValues(ViewBase *view) const
Does the drawing based on the accumulated polyline.
ErrorBarRep * m_error_rep
The error bar representation.
virtual void setStyle(unsigned int style)
Sets the style of the line drawing.
virtual void setSize(float value)
Sets the size of the representation.
virtual const Color & color() const
Returns the representation's color.
~ColumnPointRep()
The destructor.
Class representing a rectangle.
virtual void setColor(const Color &)
Sets the color of the representation.
Style
Line style constants.
float m_size
The size of the representation.
std::vector< double > m_y
A cache of the points to be drawn along the Y axis.
virtual void setSize(float value)
Sets the size of the line drawing and that of the error bar.
The abstract base class for views.
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...
hippodraw::ColumnPointRep class interface
A transform that transforms coordinates from one 2D coordinate system to another. ...
hippodraw::DataPointTuple namespace interface
A rep to draw error bars, owned by point reps.
A PointRep class that draws a column to represent the value.
hippodraw::ViewBase class interface
ColumnPointRep()
The default constructor.
float size() const
Returns the size of the representation.
The base class for the point representation hierarchy.
std::vector< double > m_x
A cache of the points to be drawn along the X axis.
The base class for the point representation hierarchy.
Base class for DataSource.