Fawkes API
Fawkes Development Version
|
Class representing a circle Line represented by its center point and radius. More...
#include "visdisplay.h"
Public Member Functions | |
Circle (float x, float y, float radius, unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0) | |
Constructor. More... | |
void | draw (Cairo::RefPtr< Cairo::Context > &cr) |
Draw shape to Cairo context. More... | |
![]() | |
Shape (unsigned int id, unsigned int owner, fawkes::VisualDisplay2DInterface::LineStyle line_style=fawkes::VisualDisplay2DInterface::LS_SOLID, unsigned char r=0, unsigned char g=0, unsigned char b=0, unsigned char a=0) | |
Constructor. More... | |
virtual | ~Shape () |
Virtual empty destructor. More... | |
void | apply_style (Cairo::RefPtr< Cairo::Context > &cr) |
Set style on context. More... | |
unsigned int | id () |
Get shape ID. More... | |
unsigned int | owner () |
Get owner ID. More... | |
void | color (float &r, float &g, float &b, float &a) |
Get shape color. More... | |
Additional Inherited Members | |
![]() | |
fawkes::VisualDisplay2DInterface::LineStyle | _line_style |
Line style. More... | |
float | _color_r |
red part of RGBA object color More... | |
float | _color_g |
green part of RGBA object color More... | |
float | _color_b |
blue part of RGBA object color More... | |
float | _color_a |
alpha part of RGBA object color More... | |
unsigned int | _id |
Object ID. More... | |
unsigned int | _owner |
Owner ID. More... | |
Class representing a circle Line represented by its center point and radius.
Definition at line 100 of file visdisplay.h.
VisualDisplay2D::Circle::Circle | ( | float | x, |
float | y, | ||
float | radius, | ||
unsigned int | id, | ||
unsigned int | owner, | ||
fawkes::VisualDisplay2DInterface::LineStyle | line_style = fawkes::VisualDisplay2DInterface::LS_SOLID , |
||
unsigned char | r = 0 , |
||
unsigned char | g = 0 , |
||
unsigned char | b = 0 , |
||
unsigned char | a = 0 |
||
) |
Constructor.
x | X coordinate of center point |
y | Y coordinate of center point |
radius | radius of the circle |
id | object ID |
owner | ID of the owner of the object |
line_style | drawing style of lines of shapes |
r | red part of RGBA color |
g | green part of RGBA color |
b | blue part of RGBA color |
a | alpha part of RGBA color |
Definition at line 303 of file visdisplay.cpp.
|
virtual |
Draw shape to Cairo context.
This method shall be implemented by a shape to draw itself using the provided Cairo context.
cr | reference to Cairo context. Note that this is a reference bypassing the reference pointer. This is done for efficiency and with the assumption that this method is only called by VisualDisplay2D::draw() which itself has proper refptr handling. |
Implements VisualDisplay2D::Shape.
Definition at line 317 of file visdisplay.cpp.