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_;
Class representing a circle Line represented by its center point and radius.
Circle(float x, float y, float radius, unsigned int id, fawkes::Uuid 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.
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
Class representing a line.
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
Line(float x1, float y1, float x2, float y2, unsigned int id, fawkes::Uuid 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 rectangle.
Rectangle(float x, float y, float width, float height, unsigned int id, fawkes::Uuid 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.
void draw(Cairo::RefPtr< Cairo::Context > &cr)
Draw shape to Cairo context.
Class representing a shape.
fawkes::Uuid _owner
Owner ID.
unsigned int _id
Object ID.
float _color_g
green part of RGBA object color
virtual void draw(Cairo::RefPtr< Cairo::Context > &cr)=0
Draw shape to Cairo context.
fawkes::VisualDisplay2DInterface::LineStyle _line_style
Line style.
float _color_r
red part of RGBA object color
Shape(unsigned int id, fawkes::Uuid 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.
float _color_b
blue part of RGBA object color
void apply_style(Cairo::RefPtr< Cairo::Context > &cr)
Set style on context.
fawkes::Uuid owner()
Get owner ID.
float _color_a
alpha part of RGBA object color
void color(float &r, float &g, float &b, float &a)
Get shape color.
unsigned int id()
Get shape ID.
virtual ~Shape()
Virtual empty destructor.
Class representing a text object.
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, fawkes::Uuid owner, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0)
Constructor.
2D visualization processor for VisualDisplay2DInterface.
VisualDisplay2D()
Constructor.
void set_interface(fawkes::VisualDisplay2DInterface *interface)
Set interface.
void draw(Cairo::RefPtr< Cairo::Context > cr)
Draw objects.
~VisualDisplay2D()
Destructor.
void process_messages()
Process messages.
A convenience class for universally unique identifiers (UUIDs).
VisualDisplay2DInterface Fawkes BlackBoard Interface.
Anchor
Enumeration defining the possible anchor points.
LineStyle
Enumeration defining the possible line styles.