Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::GeomDrawingArea Class Reference

A Gtk::DrawingArea that allows to easily display drawable objects of the geometry library. More...

#include <>>

Inheritance diagram for fawkes::GeomDrawingArea:

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. More...
 
virtual ~GeomDrawingArea ()
 Destructor. More...
 
void clear ()
 Clear the drawing area. More...
 
GeomDrawingAreaoperator<< (fawkes::HomPoint &p)
 <<-operator for HomPoint objects More...
 
GeomDrawingAreaoperator<< (const fawkes::HomPoint &p)
 <<-operator for HomPoint objects More...
 
GeomDrawingAreaoperator<< (std::pair< HomVector, HomPoint > v)
 <<-operator for HomVector objects More...
 
GeomDrawingAreaoperator<< (fawkes::LineSegment &l)
 <<-operator for LineSegments objects More...
 
GeomDrawingAreaoperator<< (fawkes::Bezier &b)
 <<-operator for Bezier objects. More...
 
GeomDrawingAreaoperator<< (fawkes::Spline &s)
 <<-operator for Spline objects. More...
 
GeomDrawingAreaoperator<< (const fawkes::Spline &s)
 <<-operator for Spline objects. More...
 
GeomDrawingAreaoperator<< (fawkes::DrawingManipulator *m)
 <<-operator for DrawingManipulator objects. More...
 
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. More...
 

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. More...
 
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. More...
 

Detailed Description

A Gtk::DrawingArea that allows to easily display drawable objects of the geometry library.

Author
Daniel Beck

Definition at line 44 of file geom_drawing_area.h.

Constructor & Destructor Documentation

fawkes::GeomDrawingArea::GeomDrawingArea ( float  max_x = 5.0,
float  max_y = 5.0,
float  min_x = -5.0,
float  min_y = -5.0 
)

Constructor.

Parameters
max_xtop right corner
max_ytop right corner
min_xbottom left corner
min_ybottom left corner

Definition at line 75 of file geom_drawing_area.cpp.

fawkes::GeomDrawingArea::~GeomDrawingArea ( )
virtual

Destructor.

Definition at line 106 of file geom_drawing_area.cpp.

References clear().

Member Function Documentation

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

Parameters
pa HomPoint object
Returns
a reference to the drawing area

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<< ( const fawkes::HomPoint p)

<<-operator for HomPoint objects

Parameters
pa HomPoint object
Returns
a reference to the drawing area

Definition at line 149 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

Parameters
vpa pair constisting of the vector and the offset
Returns
a reference to the drawing area

Definition at line 166 of file geom_drawing_area.cpp.

GeomDrawingArea & fawkes::GeomDrawingArea::operator<< ( fawkes::LineSegment l)

<<-operator for LineSegments objects

Parameters
la LineSegment object
Returns
a reference to the drawing area

Definition at line 181 of file geom_drawing_area.cpp.

GeomDrawingArea & fawkes::GeomDrawingArea::operator<< ( fawkes::Bezier b)

<<-operator for Bezier objects.

Parameters
ba Bezier object
Returns
a reference to the drawing area

Definition at line 194 of file geom_drawing_area.cpp.

GeomDrawingArea & fawkes::GeomDrawingArea::operator<< ( fawkes::Spline s)

<<-operator for Spline objects.

Parameters
sa Spline object
Returns
a reference to the drawing area

Definition at line 207 of file geom_drawing_area.cpp.

GeomDrawingArea & fawkes::GeomDrawingArea::operator<< ( const fawkes::Spline s)

<<-operator for Spline objects.

Parameters
sa Spline object
Returns
a reference to the drawing area

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.

Parameters
ma DrawingManipulator object
Returns
a reference to the drawing area

Definition at line 234 of file geom_drawing_area.cpp.

References fawkes::DrawingManipulator::integrate().

void fawkes::GeomDrawingArea::post_draw ( Cairo::RefPtr< Cairo::Context > &  context)
protectedvirtual

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.

Parameters
contextthe drawing context

Definition at line 331 of file geom_drawing_area.cpp.

void fawkes::GeomDrawingArea::pre_draw ( Cairo::RefPtr< Cairo::Context > &  context)
protectedvirtual

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.

Parameters
contextthe 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.

Parameters
window_xthe window coordinate
window_ythe window coordinate
drawing_xthe drawing coordinate
drawing_ythe drawing coordinate

Definition at line 300 of file geom_drawing_area.cpp.


The documentation for this class was generated from the following files: