Fawkes API  Fawkes Development Version
fawkes::DrawingManipulator Class Reference

Allows to control some aspects of the rendering of objects. More...

#include <>>

Inheritance diagram for fawkes::DrawingManipulator:

Public Types

enum  Color {
  BLACK, WHITE, RED, GREEN,
  BLUE
}
 Some pre-defined colors. More...
 

Public Member Functions

 DrawingManipulator ()
 Constructor. More...
 
virtual ~DrawingManipulator ()
 Desctructor. More...
 
void integrate (const DrawingManipulator *m)
 Integrates the parameters of another manipulator. More...
 
void set_line_width (float w)
 Set the line width. More...
 
float get_line_width () const
 Get the line width. More...
 
void set_point_size (float s)
 Set the point size. More...
 
float get_point_size () const
 Get the point size. More...
 
void set_color (Color c)
 Set the color. More...
 
void set_color (float r, float g, float b)
 Set the color specified in RGB. More...
 
void get_color (float &r, float &g, float &b) const
 Get the color. More...
 
virtual void draw (Cairo::RefPtr< Cairo::Context > &context)
 This method is called by the GeomDrawingArea. More...
 
- Public Member Functions inherited from fawkes::GeomDrawer
 GeomDrawer ()
 Constructor. More...
 
virtual ~GeomDrawer ()
 Destructor. More...
 

Detailed Description

Allows to control some aspects of the rendering of objects.

Author
Daniel Beck

Definition at line 32 of file drawing_manipulator.h.

Member Enumeration Documentation

Some pre-defined colors.

Enumerator
BLACK 

black

WHITE 

white

RED 

red

GREEN 

green

BLUE 

blue

Definition at line 38 of file drawing_manipulator.h.

Constructor & Destructor Documentation

fawkes::DrawingManipulator::DrawingManipulator ( )

Constructor.

Definition at line 39 of file drawing_manipulator.cpp.

fawkes::DrawingManipulator::~DrawingManipulator ( )
virtual

Desctructor.

Definition at line 52 of file drawing_manipulator.cpp.

Member Function Documentation

void fawkes::DrawingManipulator::draw ( Cairo::RefPtr< Cairo::Context > &  context)
virtual

This method is called by the GeomDrawingArea.

Here, derived classes should implement the drawing code.

Parameters
contextthe drawing context

Implements fawkes::GeomDrawer.

Definition at line 202 of file drawing_manipulator.cpp.

void fawkes::DrawingManipulator::get_color ( float &  r,
float &  g,
float &  b 
) const

Get the color.

Parameters
rreference to a variable where the R value of the current color is written to
greference to a variable where the G value of the current color is written to
breference to a variable where the B value of the current color is written to

Definition at line 194 of file drawing_manipulator.cpp.

float fawkes::DrawingManipulator::get_line_width ( ) const

Get the line width.

Returns
the line width

Definition at line 95 of file drawing_manipulator.cpp.

float fawkes::DrawingManipulator::get_point_size ( ) const

Get the point size.

Returns
the point size

Definition at line 117 of file drawing_manipulator.cpp.

Referenced by fawkes::GeomDrawingArea::operator<<().

void fawkes::DrawingManipulator::integrate ( const DrawingManipulator m)

Integrates the parameters of another manipulator.

If a certain field in this manipulator is not set it is assigned the respective value from the specified manipualator.

Parameters
mthe manipulator to integrate

Definition at line 62 of file drawing_manipulator.cpp.

Referenced by fawkes::GeomDrawingArea::operator<<().

void fawkes::DrawingManipulator::set_color ( Color  c)

Set the color.

Parameters
cthe color

Definition at line 126 of file drawing_manipulator.cpp.

References BLACK, BLUE, GREEN, RED, and WHITE.

Referenced by fawkes::set_color().

void fawkes::DrawingManipulator::set_color ( float  r,
float  g,
float  b 
)

Set the color specified in RGB.

Parameters
rthe R value of the color
gthe G value of the color
bthe B value of the color

Definition at line 176 of file drawing_manipulator.cpp.

void fawkes::DrawingManipulator::set_line_width ( float  w)

Set the line width.

Parameters
wthe line width

Definition at line 82 of file drawing_manipulator.cpp.

Referenced by fawkes::set_line_width().

void fawkes::DrawingManipulator::set_point_size ( float  s)

Set the point size.

Parameters
sthe point size

Definition at line 104 of file drawing_manipulator.cpp.

Referenced by fawkes::set_point_size().


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