Public Member Functions | Protected Member Functions

fawkes::GeomDrawingArea Class Reference

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

#include <>>

List of all members.

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.
GeomDrawingAreaoperator<< (fawkes::HomPoint &p)
 <<-operator for HomPoint objects
GeomDrawingAreaoperator<< (const fawkes::HomPoint &p)
 <<-operator for HomPoint objects
GeomDrawingAreaoperator<< (std::pair< HomVector, HomPoint > v)
 <<-operator for HomVector objects
GeomDrawingAreaoperator<< (fawkes::LineSegment &l)
 <<-operator for LineSegments objects
GeomDrawingAreaoperator<< (fawkes::Bezier &b)
 <<-operator for Bezier objects.
GeomDrawingAreaoperator<< (fawkes::Spline &s)
 <<-operator for Spline objects.
GeomDrawingAreaoperator<< (const fawkes::Spline &s)
 <<-operator for Spline objects.
GeomDrawingAreaoperator<< (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.

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_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]

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:
p a 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<< ( std::pair< HomVector, HomPoint vp  ) 

<<-operator for HomVector objects

Parameters:
vp a 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<< ( const fawkes::Spline s  ) 

<<-operator for Spline objects.

Parameters:
s a 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:
m a DrawingManipulator object
Returns:
a reference to the drawing area

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

Parameters:
l a LineSegment object
Returns:
a reference to the drawing area

Definition at line 181 of file geom_drawing_area.cpp.

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

<<-operator for Spline objects.

Parameters:
s a Spline object
Returns:
a reference to the drawing area

Definition at line 207 of file geom_drawing_area.cpp.

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

<<-operator for Bezier objects.

Parameters:
b a Bezier object
Returns:
a reference to the drawing area

Definition at line 194 of file geom_drawing_area.cpp.

GeomDrawingArea & fawkes::GeomDrawingArea::operator<< ( const fawkes::HomPoint p  ) 

<<-operator for HomPoint objects

Parameters:
p a 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().

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.

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

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

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


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