drawing_manipulator.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __GEOMETRY_DRAWING_MANIPULATOR_H_
00026 #define __GEOMETRY_DRAWING_MANIPULATOR_H_
00027
00028 #include <geometry/gtk/geom_drawer.h>
00029
00030 namespace fawkes {
00031
00032 class DrawingManipulator : public GeomDrawer
00033 {
00034 public:
00035 DrawingManipulator();
00036 virtual ~DrawingManipulator();
00037
00038 enum Color
00039 {
00040 BLACK,
00041 WHITE,
00042 RED,
00043 GREEN,
00044 BLUE
00045 };
00046
00047 void integrate(const DrawingManipulator* m);
00048
00049 void set_line_width(float w);
00050 float get_line_width() const;
00051
00052 void set_point_size(float s);
00053 float get_point_size() const;
00054
00055 void set_color(Color c);
00056 void set_color(float r, float g, float b);
00057 void get_color(float& r, float& g, float& b) const;
00058
00059 virtual void draw(Cairo::RefPtr<Cairo::Context>& context);
00060
00061 private:
00062 float m_line_width;
00063 float m_point_size;
00064 float m_color_r;
00065 float m_color_g;
00066 float m_color_b;
00067
00068 bool m_line_width_set;
00069 bool m_point_size_set;
00070 bool m_color_set;
00071 };
00072
00073 DrawingManipulator* set_line_width(float w);
00074 DrawingManipulator* set_point_size(float s);
00075 DrawingManipulator* set_color(float r, float g, float b);
00076 DrawingManipulator* set_color(DrawingManipulator::Color c);
00077
00078 }
00079
00080 #endif