7 #ifndef Hippo_OpenGLView_h
8 #define Hippo_OpenGLView_h
29 virtual void drawLines (
const std::vector< double > & x,
30 const std::vector< double > & y,
34 const std::vector< double > & y,
36 const std::vector <hippodraw::Color> & colors,
40 const std::vector< double > & y,
44 const std::vector< double > & y,
47 virtual void drawPolyLine (
const std::vector< double > & xpoints,
48 const std::vector< double > & ypoints,
51 virtual void drawSquare (
double x1,
double y1,
double x2,
double y2,
52 int red,
int green,
int blue );
53 virtual void drawViewSquare (
float x1,
float y1,
float x2,
float y2,
54 int red,
int green,
int blue );
55 virtual void drawPoints (
const std::vector<double> & x,
56 const std::vector<double> & y,
60 virtual void drawPoints (
const std::vector< double > & x,
61 const std::vector< double > & y,
62 const std::vector< hippodraw::Color > & colors,
65 virtual void drawMag (
float x,
float y,
int mag,
float fontsize );
69 virtual void drawText (
const std::string &s,
float x,
float y,
70 float fontsize,
float angle,
71 char xp,
char yp ,
bool resize =
false );
72 virtual void drawText (
const std::string &s,
float x,
float y,
73 float fontsize,
float angle,
74 char xp,
char yp ,
bool resize =
false,
79 virtual void setDrawRect (
float x,
float y,
float w,
float h );
87 void setRect(
double x,
double y,
double w,
double h);
91 float toViewX (
double datX )
const;
92 float toViewY (
double datY )
const;
95 float toX (
double x )
const;
96 float toY (
double y )
const;
97 void draw_Text (
const std::string &s,
float x,
float y,
98 float fontsize,
float angle,
106 #endif // Hippo_OpenGLView_h
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
void draw_Text(const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, const hippodraw::FontBase *font=0)
TextTTF permits to render text in the pixmap buffer by using the freetype fonts.
virtual void drawPolyLine(const std::vector< double > &xpoints, const std::vector< double > &ypoints, hippodraw::Line::Style style, const hippodraw::Color &color, float)
Draws a polyline.
float toCanvasY(double datY) const
void setRect(double x, double y, double w, double h)
float userToDrawXAutoInv(double x) const
Type
Enumeration of the type of symbols supported by this class.
float userToDrawColor(double c) const
Converts a coordinate in user space to drawing space along the color (X) axis.
float userToDrawX(double x) const
Converts a coordinate in user space to drawing space along the X axis.
virtual void drawViewSquare(float x1, float y1, float x2, float y2, int red, int green, int blue)
Draws a colored square in view space.
virtual void drawPoints(const std::vector< double > &x, const std::vector< double > &y, hippodraw::Symbol::Type type, float sym_size, const hippodraw::Color &color)
Draws symbol points.
hippodraw::Rect m_draw_rect
float userToDrawY(double x) const
Converts a coordinate in user space to drawing space along the Y axis.
virtual void setDrawRect(float x, float y, float w, float h)
Sets the drawing Rectangle in the devices coordinate system.
virtual void drawViewLines(const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, bool color, float)
Draws multiple line segments.
A abstract base class for font handling.
The abstract base class for views that have a region for drawing data points with area around it for ...
A Color class for creating the color object following the standard RGB color space.
float toViewY(double datY) const
The base class for the PlotterBase hierarchy.
PyArray_TYPES type(numeric::array arr)
hippodraw::DataView class interface
virtual hippodraw::Rect getDrawRect() const
Returns the drawing Rectangle in the devices coordinate system.
intp size(numeric::array arr)
Class representing a rectangle.
Style
Line style constants.
virtual void drawLines(const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const hippodraw::Color &color, float)
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2...
hippodraw::TextTTF * m_TTF
virtual void drawMag(float x, float y, int mag, float fontsize)
virtual void drawSquare(double x1, double y1, double x2, double y2, int red, int green, int blue)
Draws a colored square.
hippodraw::PlotterBase * getPlotter() const
float toX(double x) const
The ViewBase class using OpenGL for drawing.
virtual void update(const hippodraw::Observable *)
Implements the update method of the Observer pattern.
float toViewX(double datX) const
virtual void drawText(const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize=false)
virtual void drawColorLines(const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const std::vector< hippodraw::Color > &colors, float size)
Draws multiple line segments, each with a different color - that is, a line between x0...
float toCanvasX(double datX) const
void setPlotter(hippodraw::PlotterBase *)
Sets the PlotterBase object to plotter.
float toY(double y) const