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