List of all members.
Public Member Functions |
| Line (Canvas *canvas, double xstart, double ystart, double xend, double yend) |
| Line (Group *parent, double xstart, double ystart, double xend, double yend, ItemClient *client=NULL) |
virtual | ~Line () |
void | SetPosition (double xstart, double ystart, double xend, double yend) |
double | Distance (double x, double y, Item **item) const |
void | Draw (cairo_t *cr, bool is_vector) const |
void | Move (double x, double y) |
Protected Member Functions |
void | UpdateBounds () |
Protected Attributes |
double | m_xstart |
double | m_ystart |
double | m_xend |
double | m_yend |
Detailed Description
Straight lines.
Implements one segment straight lines.
Definition at line 39 of file line.h.
Constructor & Destructor Documentation
gccv::Line::Line |
( |
Canvas * |
canvas, |
|
|
double |
xstart, |
|
|
double |
ystart, |
|
|
double |
xend, |
|
|
double |
yend | |
|
) |
| | |
- Parameters:
-
| canvas | a Canvas. |
| xstart | the horizontal start position. |
| ystart | the vertical start position. |
| xend | the horizontal end position. |
| yend | the vertical end position. |
Creates a new Line sets it as a child of the root Group of canvas.
gccv::Line::Line |
( |
Group * |
parent, |
|
|
double |
xstart, |
|
|
double |
ystart, |
|
|
double |
xend, |
|
|
double |
yend, |
|
|
ItemClient * |
client = NULL | |
|
) |
| | |
- Parameters:
-
| parent | the Group to which the new Line will be added. |
| xstart | the horizontal start position. |
| ystart | the vertical start position. |
| xend | the horizontal end position. |
| yend | the vertical end position. |
| client | the ItemClient for the new Line if any. |
Creates a new Line inside parent and sets client as its associated ItemClient.
virtual gccv::Line::~Line |
( |
|
) |
[virtual] |
Member Function Documentation
double gccv::Line::Distance |
( |
double |
x, |
|
|
double |
y, |
|
|
Item ** |
item | |
|
) |
| | const [virtual] |
void gccv::Line::Draw |
( |
cairo_t * |
cr, |
|
|
bool |
is_vector | |
|
) |
| | const [virtual] |
- Parameters:
-
| cr | a cairo_t. |
| is_vector | whether the cairo_t is a vectorial context. |
Draws the Line to cr.
Reimplemented from gccv::Item.
Reimplemented in gccv::Arrow.
void gccv::Line::Move |
( |
double |
x, |
|
|
double |
y | |
|
) |
| | [virtual] |
- Parameters:
-
| x | the horizontal deplacement |
| y | the vertical deplacement |
Moves the Line.
Reimplemented from gccv::Item.
void gccv::Line::SetPosition |
( |
double |
xstart, |
|
|
double |
ystart, |
|
|
double |
xend, |
|
|
double |
yend | |
|
) |
| | |
- Parameters:
-
| xstart | the new horizontal start position. |
| ystart | the new vertical start position. |
| xend | the new horizontal end position. |
| yend | the new vertical end position. |
Sets the Line position.
void gccv::Line::UpdateBounds |
( |
|
) |
[protected, virtual] |
Member Data Documentation
The horizontal end position.
Definition at line 120 of file line.h.
The horizontal start position.
Definition at line 112 of file line.h.
The vertical end position.
Definition at line 124 of file line.h.
The vertical start position.
Definition at line 116 of file line.h.
The documentation for this class was generated from the following file: