fawkes::DrawingManipulator Class Reference

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

#include <geometry/gtk/drawing_manipulator.h>

Inheritance diagram for fawkes::DrawingManipulator:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Color {
  BLACK, WHITE, RED, GREEN,
  BLUE
}
 

Some pre-defined colors.

More...

Public Member Functions

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

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:
context the 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:
r reference to a variable where the R value of the current color is written to
g reference to a variable where the G value of the current color is written to
b reference 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:
m the manipulator to integrate

Definition at line 62 of file drawing_manipulator.cpp.

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

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

Set the color specified in RGB.

Parameters:
r the R value of the color
g the G value of the color
b the B value of the color

Definition at line 176 of file drawing_manipulator.cpp.

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

Set the color.

Parameters:
c the color

Definition at line 126 of file drawing_manipulator.cpp.

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

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

Set the line width.

Parameters:
w the line width

Definition at line 82 of file drawing_manipulator.cpp.

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

Set the point size.

Parameters:
s the point size

Definition at line 104 of file drawing_manipulator.cpp.


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1