VectorDrawer Class Reference

This class is responsible for drawing the vectors on the screen using the cairo graphics model. More...

#include <vectordrawer.h>

List of all members.

Public Member Functions

 VectorDrawer (Cairo::RefPtr< Cairo::Context > cc, double h)
 VectorDrawer (const VectorDrawer &vd)
 ~VectorDrawer ()
void set_text (std::string &t)
 Set the additional text.
void set_text (const char *t)
 Set the additional text.
void clear_text ()
 Clear the additional text.
std::string & get_text ()
 Get the additional text.
void set_put_text (bool pt=true)
 Set whether or not the additional text has to be drawn too.
bool is_set_put_text () const
 Get the flag indicating whether or not the additional text has to be drawn.
void line (const GVectors::Segment &segment)
 Draw the line using the given GVectors::Segment.

Private Attributes

Cairo::RefPtr< Cairo::Context > cairo_ctx
double height
 Used to transform from the lower left corner (0/0) to the upper left corner (0/0).
std::string text
 The text to draw besides what gets drawed when passed to a VisualVector.
bool put_text
 Flag indicating whether or not the text will be drawn too.
bool text_drawn
 Used to circumvent the fact, that this object is used to draw the arrow lines as well.


Detailed Description

This class is responsible for drawing the vectors on the screen using the cairo graphics model.


Constructor & Destructor Documentation

VectorDrawer::VectorDrawer ( Cairo::RefPtr< Cairo::Context >  cc,
double  h 
)

VectorDrawer::VectorDrawer ( const VectorDrawer vd  ) 

VectorDrawer::~VectorDrawer (  ) 


Member Function Documentation

void VectorDrawer::set_text ( std::string &  t  )  [inline]

Set the additional text.

void VectorDrawer::set_text ( const char *  t  )  [inline]

Set the additional text.

void VectorDrawer::clear_text (  )  [inline]

Clear the additional text.

std::string& VectorDrawer::get_text (  )  [inline]

Get the additional text.

void VectorDrawer::set_put_text ( bool  pt = true  )  [inline]

Set whether or not the additional text has to be drawn too.

bool VectorDrawer::is_set_put_text (  )  const [inline]

Get the flag indicating whether or not the additional text has to be drawn.

void VectorDrawer::line ( const GVectors::Segment &  segment  ) 

Draw the line using the given GVectors::Segment.


Member Data Documentation

Cairo::RefPtr<Cairo::Context> VectorDrawer::cairo_ctx [private]

double VectorDrawer::height [private]

Used to transform from the lower left corner (0/0) to the upper left corner (0/0).

std::string VectorDrawer::text [private]

The text to draw besides what gets drawed when passed to a VisualVector.

bool VectorDrawer::put_text [private]

Flag indicating whether or not the text will be drawn too.

bool VectorDrawer::text_drawn [private]

Used to circumvent the fact, that this object is used to draw the arrow lines as well.


The documentation for this class was generated from the following files:
Generated on Tue Sep 11 01:14:33 2007 for gvectors by  doxygen 1.4.7