|
Fawkes API
Fawkes Development Version
|
Class representing a line. More...
#include "visdisplay.h"

Public Member Functions | |
| Line (float x1, float y1, float x2, float y2, 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. | |
| void | draw (Cairo::RefPtr< Cairo::Context > &cr) |
| Draw shape to Cairo context. | |
Public Member Functions inherited from VisualDisplay2D::Shape | |
| 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. | |
| virtual | ~Shape () |
| Virtual empty destructor. | |
| void | apply_style (Cairo::RefPtr< Cairo::Context > &cr) |
| Set style on context. | |
| unsigned int | id () |
| Get shape ID. | |
| unsigned int | owner () |
| Get owner ID. | |
| void | color (float &r, float &g, float &b, float &a) |
| Get shape color. | |
Additional Inherited Members | |
Protected Attributes inherited from VisualDisplay2D::Shape | |
| fawkes::VisualDisplay2DInterface::LineStyle | _line_style |
| Line style. | |
| float | _color_r |
| red part of RGBA object color | |
| float | _color_g |
| green part of RGBA object color | |
| float | _color_b |
| blue part of RGBA object color | |
| float | _color_a |
| alpha part of RGBA object color | |
| unsigned int | _id |
| Object ID. | |
| unsigned int | _owner |
| Owner ID. | |
Class representing a line.
Line represented by two end points in cartesian coordinates.
Definition at line 70 of file visdisplay.h.
| VisualDisplay2D::Line::Line | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| 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.
| x1 | X coordinate of first point |
| y1 | Y coordinate of first point |
| x2 | X coordinate of second point |
| y2 | Y coordinate of second point |
| 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 219 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 234 of file visdisplay.cpp.