Fawkes API
Fawkes Development Version
|
23 #ifndef _TOOLS_LASERGUI_VISDISPLAY_H_
24 #define _TOOLS_LASERGUI_VISDISPLAY_H_
26 #include <cairomm/context.h>
27 #include <interfaces/VisualDisplay2DInterface.h>
41 void draw(Cairo::RefPtr<Cairo::Context> cr);
46 Shape(
unsigned int id,
55 virtual void draw(Cairo::RefPtr<Cairo::Context> &cr) = 0;
73 color(
float &r,
float &g,
float &b,
float &a)
106 unsigned char a = 0);
107 void draw(Cairo::RefPtr<Cairo::Context> &cr);
130 unsigned char a = 0);
131 void draw(Cairo::RefPtr<Cairo::Context> &cr);
153 unsigned char a = 0);
154 void draw(Cairo::RefPtr<Cairo::Context> &cr);
167 const std::string & text,
175 unsigned char a = 0);
176 void draw(Cairo::RefPtr<Cairo::Context> &cr);
187 std::map<unsigned int, Shape *> shapes_;
188 std::map<unsigned int, Shape *>::iterator sit_;
void apply_style(Cairo::RefPtr< Cairo::Context > &cr)
Set style on context.
Circle(float x, float y, float radius, unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
Constructor.
Class representing a text object.
virtual void draw(Cairo::RefPtr< Cairo::Context > &cr)=0
Draw shape to Cairo context.
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
Rectangle(float x, float y, float width, float height, unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
Constructor.
unsigned int id()
Get shape ID.
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
2D visualization processor for VisualDisplay2DInterface.
unsigned int owner()
Get owner ID.
unsigned int _owner
Owner ID.
Class representing a line.
Class representing a circle Line represented by its center point and radius.
Line(float x1, float y1, float x2, float y2, unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
Constructor.
unsigned int _id
Object ID.
void set_interface(fawkes::VisualDisplay2DInterface *interface)
Set interface.
VisualDisplay2DInterface Fawkes BlackBoard Interface.
Class representing a rectangle.
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
Text(float x, float y, const std::string &text, fawkes::VisualDisplay2DInterface::Anchor anchor, float size, unsigned int id, unsigned int owner, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
Constructor.
float _color_r
red part of RGBA object color
VisualDisplay2D()
Constructor.
void draw(Cairo::RefPtr< Cairo::Context > cr)
Draw objects.
Class representing a shape.
~VisualDisplay2D()
Destructor.
float _color_g
green part of RGBA object color
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
void process_messages()
Process messages.
LineStyle
Enumeration defining the possible line styles.
fawkes::VisualDisplay2DInterface::LineStyle _line_style
Line style.
virtual ~Shape()
Virtual empty destructor.
void color(float &r, float &g, float &b, float &a)
Get shape color.
float _color_b
blue part of RGBA object color
float _color_a
alpha part of RGBA object color
Anchor
Enumeration defining the possible anchor points.
Shape(unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
Constructor.