14 #include "msdevstudio/MSconfig.h"
33 m_line_style ( Line::
Solid )
40 m_line_style ( Line::
Solid )
46 m_line_style ( Line::
Solid )
52 m_line_style ( point_rep.m_line_style )
85 unsigned int size = ntuple -> rows ();
86 if ( size == 0 )
return;
95 for ( ; i <
size; i++ ) {
96 const vector < double > & row = ntuple -> getRow ( i );
97 double x = row [
dp::X ];
98 double y = row [
dp::Y ];
105 t -> transform (
m_x,
m_y );
122 unsigned int size =
m_x.size ();
123 if ( size == 0 )
return;
141 std::vector<double>::const_iterator ix =
m_x.begin();
142 std::vector<double>::const_iterator iy =
m_y.begin();
143 bool isCorner(
false);
144 std::vector<double> xcorner;
145 std::vector<double> ycorner;
159 isCorner =
cornerCase(ix, iy, xcorner, ycorner);
175 std::vector<double>::const_iterator iy)
const {
184 std::vector<double>::const_iterator iy,
186 double & distance)
const {
222 std::vector<double>::const_iterator iy,
224 double & distance)
const {
260 std::vector<double>::const_iterator iy)
const {
261 return (x - *ix)/(*(ix+1) - *ix)*(*(iy+1) - *iy) + *iy;
272 std::vector<double>::const_iterator iy,
273 std::vector<double> & x, std::vector<double> & y)
const {
278 x.push_back(pt1.
getX());
279 y.push_back(pt1.
getY());
280 x.push_back(pt2.
getX());
281 y.push_back(pt2.
getY());
287 std::vector<double>::const_iterator iy,
289 Point xpt1, xpt2, ypt1, ypt2;
293 if (xstrad || ystrad) {
294 if ( (xstrad && ystrad && xdist < ydist) || xstrad ) {
297 }
else if ( (xstrad && ystrad && xdist > ydist) || ystrad ) {
309 std::vector<double>::const_iterator iy,
310 std::vector<double> & x, std::vector<double> & y)
const {
311 Point xpt1, xpt2, ypt1, ypt2;
321 x.push_back(xpt1.
getX());
322 y.push_back(xpt1.
getY());
324 x.push_back(xpt2.
getX());
325 y.push_back(xpt2.
getY());
328 x.push_back(ypt1.
getX());
329 y.push_back(ypt1.
getY());
331 x.push_back(ypt2.
getX());
332 y.push_back(ypt2.
getY());
float m_size
The size of the representation.
double getY() const
A shortcut to get origin.Y.
void findEndPoints(std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2) const
void transformValues(const DataSource *source, TransformBase *transform)
Transform the projected values in source with transform.
bool straddles_y_boundary(std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2, double &distance) const
double separation(const Point &pt1, const Point &pt2) const
double getY() const
The following function returns the Y coordinate.
The base class for the point representation hierarchy.
hippodraw::ViewBase class interface
virtual ~LinePointRep()
The destructor.
hippodraw::BinaryTransform class interface
void drawValues(ViewBase *view)
Draws the projected values from protected transformed copy to view.
bool cornerCase(std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, std::vector< double > &x, std::vector< double > &y) const
double getX() const
A shortcut to get origin.X.
LinePointRep()
The default constructor.
float size() const
Returns the size of the representation.
double getWidth() const
A shortcut to get size.width.
Style convert(unsigned int style)
bool isInBounds(double x1, double y1) const
Checks the coordinates to see if they are inside or on the boundary of the rectangle.
double getX() const
The following function returns the X coordinate.
hippodraw::DataPointTuple namespace interface
hippodraw::LinePointRep class interface
A transform that transforms coordinates from one coordinate system to another.
hippodraw::Line::Style m_line_style
The style currently used.
std::vector< double > m_y
A cache of the points along the Y axis to be drawn.
virtual void setStyle(unsigned int style)
Sets the style of the line drawing.
hippodraw::Range class interface
A PointRep class that draws a column to represent the value.
intp size(numeric::array arr)
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 along the X axis to be drawn.
A transform that transforms coordinates from one 2D coordinate system to another. ...
hippodraw::DataSource class interface.
bool outside_box(std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy) const
A Color class for creating the color object following the standard RGB color space.
Style
Line style constants.
bool straddles_x_boundary(std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, Point &pt1, Point &pt2, double &distance) const
The base class for the point representation hierarchy.
Base class for DataSource.
virtual RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
double getHeight() const
A shortcut to get size.height.
Class representing a two or three dimension point.
void setPoint(double x, double y)
virtual unsigned int getStyle() const
Returns the style of the line drawing.
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *previews)
Draws the projected values.
void addEndPoints(std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy, std::vector< double > &x, std::vector< double > &y) const
virtual const Color & color() const
Returns the representation's color.
A namespace to set the standard for indexing into 2 dimension data point tuple.
double interpolate(double x, std::vector< double >::const_iterator ix, std::vector< double >::const_iterator iy) const
The abstract base class for views.