A Gtk::DrawingArea that allows to easily display drawable objects of the geometry library. More...
#include <>>
Public Member Functions | |
GeomDrawingArea (float max_x=5.0, float max_y=5.0, float min_x=-5.0, float min_y=-5.0) | |
Constructor. | |
virtual | ~GeomDrawingArea () |
Destructor. | |
void | clear () |
Clear the drawing area. | |
GeomDrawingArea & | operator<< (fawkes::HomPoint &p) |
<<-operator for HomPoint objects | |
GeomDrawingArea & | operator<< (const fawkes::HomPoint &p) |
<<-operator for HomPoint objects | |
GeomDrawingArea & | operator<< (std::pair< HomVector, HomPoint > v) |
<<-operator for HomVector objects | |
GeomDrawingArea & | operator<< (fawkes::LineSegment &l) |
<<-operator for LineSegments objects | |
GeomDrawingArea & | operator<< (fawkes::Bezier &b) |
<<-operator for Bezier objects. | |
GeomDrawingArea & | operator<< (fawkes::Spline &s) |
<<-operator for Spline objects. | |
GeomDrawingArea & | operator<< (const fawkes::Spline &s) |
<<-operator for Spline objects. | |
GeomDrawingArea & | operator<< (fawkes::DrawingManipulator *m) |
<<-operator for DrawingManipulator objects. | |
virtual void | to_drawing_coords (int window_x, int window_y, float &drawing_x, float &drawing_y) |
Convert the given window coordinates into the frame of the drawing area. | |
Protected Member Functions | |
virtual void | pre_draw (Cairo::RefPtr< Cairo::Context > &context) |
This method is called by the expose signal handler before the draw routines of the registered drawers are called. | |
virtual void | post_draw (Cairo::RefPtr< Cairo::Context > &context) |
This method is called by the expose signal handler after the draw routines of the registered drawers are called. |
A Gtk::DrawingArea that allows to easily display drawable objects of the geometry library.
Definition at line 44 of file geom_drawing_area.h.
fawkes::GeomDrawingArea::GeomDrawingArea | ( | float | max_x = 5.0 , |
|
float | max_y = 5.0 , |
|||
float | min_x = -5.0 , |
|||
float | min_y = -5.0 | |||
) |
Constructor.
max_x | top right corner | |
max_y | top right corner | |
min_x | bottom left corner | |
min_y | bottom left corner |
Definition at line 75 of file geom_drawing_area.cpp.
fawkes::GeomDrawingArea::~GeomDrawingArea | ( | ) | [virtual] |
void fawkes::GeomDrawingArea::clear | ( | void | ) |
Clear the drawing area.
Definition at line 113 of file geom_drawing_area.cpp.
Referenced by ~GeomDrawingArea().
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | fawkes::HomPoint & | p | ) |
<<-operator for HomPoint objects
p | a HomPoint object |
Definition at line 132 of file geom_drawing_area.cpp.
References fawkes::DrawingManipulator::get_point_size(), and fawkes::HomPointDrawer::set_point_size().
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | std::pair< HomVector, HomPoint > | vp | ) |
<<-operator for HomVector objects
vp | a pair constisting of the vector and the offset |
Definition at line 166 of file geom_drawing_area.cpp.
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | const fawkes::Spline & | s | ) |
<<-operator for Spline objects.
s | a Spline object |
Definition at line 220 of file geom_drawing_area.cpp.
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | fawkes::DrawingManipulator * | m | ) |
<<-operator for DrawingManipulator objects.
Note: the drawing area takes over the ownwership of the manipulator.
m | a DrawingManipulator object |
Definition at line 234 of file geom_drawing_area.cpp.
References fawkes::DrawingManipulator::integrate().
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | fawkes::LineSegment & | l | ) |
<<-operator for LineSegments objects
l | a LineSegment object |
Definition at line 181 of file geom_drawing_area.cpp.
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | fawkes::Spline & | s | ) |
<<-operator for Spline objects.
s | a Spline object |
Definition at line 207 of file geom_drawing_area.cpp.
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | fawkes::Bezier & | b | ) |
<<-operator for Bezier objects.
b | a Bezier object |
Definition at line 194 of file geom_drawing_area.cpp.
GeomDrawingArea & fawkes::GeomDrawingArea::operator<< | ( | const fawkes::HomPoint & | p | ) |
<<-operator for HomPoint objects
p | a HomPoint object |
Definition at line 149 of file geom_drawing_area.cpp.
References fawkes::DrawingManipulator::get_point_size(), and fawkes::HomPointDrawer::set_point_size().
void fawkes::GeomDrawingArea::post_draw | ( | Cairo::RefPtr< Cairo::Context > & | context | ) | [protected, virtual] |
This method is called by the expose signal handler after the draw routines of the registered drawers are called.
Derived classes might want to change this to add static drawing elements.
context | the drawing context |
Definition at line 331 of file geom_drawing_area.cpp.
void fawkes::GeomDrawingArea::pre_draw | ( | Cairo::RefPtr< Cairo::Context > & | context | ) | [protected, virtual] |
This method is called by the expose signal handler before the draw routines of the registered drawers are called.
Derived classes might want to change this to add static drawing elements or to change the viewing matrix.
context | the drawing context |
Definition at line 318 of file geom_drawing_area.cpp.
void fawkes::GeomDrawingArea::to_drawing_coords | ( | int | window_x, | |
int | window_y, | |||
float & | drawing_x, | |||
float & | drawing_y | |||
) | [virtual] |
Convert the given window coordinates into the frame of the drawing area.
window_x | the window coordinate | |
window_y | the window coordinate | |
drawing_x | the drawing coordinate | |
drawing_y | the drawing coordinate |
Definition at line 300 of file geom_drawing_area.cpp.