|
The Gnome Chemistry Utils 0.12.8
|
Multi-segments line. More...
#include <poly-line.h>
Public Member Functions | |
| PolyLine (Canvas *canvas, std::list< Point > &points) | |
| PolyLine (Group *parent, std::list< Point > &points, ItemClient *client=NULL) | |
| virtual | ~PolyLine () |
| void | SetPoints (std::list< Point > &points) |
| 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 | |
| std::list< Point > | m_Points |
Multi-segments line.
Line item with several linear segments.
Definition at line 41 of file poly-line.h.
| gccv::PolyLine::PolyLine | ( | Group * | parent, |
| std::list< Point > & | points, | ||
| ItemClient * | client = NULL |
||
| ) |
| parent | the Group to which the new PolyLine will be added. |
| points | the vertices positions. |
| client | the ItemClient for the new PolyLine if any. |
Creates a new PolyLine inside parent and sets client as its associated ItemClient.
| virtual gccv::PolyLine::~PolyLine | ( | ) | [virtual] |
The destructor.
| double gccv::PolyLine::Distance | ( | double | x, |
| double | y, | ||
| Item ** | item | ||
| ) | const [virtual] |
| x | horizontal position |
| y | vertical position |
| item | where to store the Item. |
Implementation of Item::Distance() for the PolyLine class. Sets item to this.
Reimplemented from gccv::Item.
| void gccv::PolyLine::Draw | ( | cairo_t * | cr, |
| bool | is_vector | ||
| ) | const [virtual] |
| cr | a cairo_t. |
| is_vector | whether the cairo_t is a vectorial context. |
Draws the PolyLine to cr.
Reimplemented from gccv::Item.
| void gccv::PolyLine::Move | ( | double | x, |
| double | y | ||
| ) | [virtual] |
| x | the horizontal deplacement |
| y | the vertical deplacement |
Moves the PolyLine.
Reimplemented from gccv::Item.
| void gccv::PolyLine::SetPoints | ( | std::list< Point > & | points | ) |
| points | the new vertices positions. |
Sets the vertices for the PolyLine instance.
| void gccv::PolyLine::UpdateBounds | ( | ) | [protected, virtual] |
Evaluates the PolyLine bounds.
Reimplemented from gccv::Item.
std::list<Point> gccv::PolyLine::m_Points [protected] |
The PolyLine vertices.
Definition at line 106 of file poly-line.h.
1.7.4