14 #include "msdevstudio/MSconfig.h"
41 m_line_style( Line::
Solid ),
49 m_line_style ( point_rep.m_line_style ),
50 m_y_flag ( point_rep.m_y_flag )
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 );
ColumnPointRep()
The default constructor.
float m_size
The size of the representation.
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.
virtual RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual void setColor(const Color &color)
Sets the Color.
hippodraw::ViewBase class interface
virtual unsigned int getStyle() const
Returns the style of the line drawing.
hippodraw::Line::Style m_line_style
The style currently used.
hippodraw::BinaryTransform class interface
A rep to draw error bars, owned by point reps.
virtual void setSize(float value)
Sets the size of the representation.
virtual void setColor(const Color &)
Sets the color of the representation.
error on X or half bin width
float size() const
Returns the size of the representation.
std::vector< double > m_y
A cache of the points to be drawn along the Y axis.
Style convert(unsigned int style)
hippodraw::DataPointTuple namespace interface
A transform that transforms coordinates from one coordinate system to another.
void makeInBounds(double &x, double &y) const
Changes the coordinates so that they are inside or on the boundary of the rectangle.
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
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
ErrorBarRep * m_error_rep
The error bar representation.
virtual void setStyle(unsigned int style)
Sets the style of the line drawing.
A PointRep class that draws a column to represent the value.
A transform that transforms coordinates from one 2D coordinate system to another. ...
~ColumnPointRep()
The destructor.
hippodraw::DataSource class interface.
A Color class for creating the color object following the standard RGB color space.
Style
Line style constants.
The base class for the point representation hierarchy.
Base class for DataSource.
void setYError(bool)
Sets the flag to plot the errors on the Y axis.
Class representing a rectangle.
virtual void setSize(float value)
Sets the size of the line drawing and that of the error bar.
bool m_y_flag
The Y error flag.
hippodraw::ErrorBarRep class interface
virtual void setErrorOn(hippodraw::Axes::Type axis, bool yes=true)
Sets the error display on or off.
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.
virtual const Color & color() const
Returns the representation's color.
A namespace to set the standard for indexing into 2 dimension data point tuple.
The abstract base class for views.