Fawkes API
Fawkes Development Version
|
Allows to control some aspects of the rendering of objects. More...
#include <>>
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... | |
![]() | |
GeomDrawer () | |
Constructor. More... | |
virtual | ~GeomDrawer () |
Destructor. More... | |
Allows to control some aspects of the rendering of objects.
Definition at line 32 of file drawing_manipulator.h.
Some pre-defined colors.
Enumerator | |
---|---|
BLACK |
black |
WHITE |
white |
RED |
red |
GREEN |
green |
BLUE |
blue |
Definition at line 38 of file drawing_manipulator.h.
fawkes::DrawingManipulator::DrawingManipulator | ( | ) |
Constructor.
Definition at line 39 of file drawing_manipulator.cpp.
Referenced by fawkes::set_color(), fawkes::set_line_width(), and fawkes::set_point_size().
|
virtual |
Desctructor.
Definition at line 52 of file drawing_manipulator.cpp.
|
virtual |
This method is called by the GeomDrawingArea.
Here, derived classes should implement the drawing code.
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.
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 |
float fawkes::DrawingManipulator::get_point_size | ( | ) | const |
Get 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.
m | the 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.
c | the 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.
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_line_width | ( | float | w | ) |
Set the line width.
w | the 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.
s | the point size |
Definition at line 104 of file drawing_manipulator.cpp.
Referenced by fawkes::set_point_size().