The Gnome Chemistry Utils
0.14.0
|
#include <polygon.h>
Public Member Functions | |
Polygon (Canvas *canvas, std::list< Point > &points) | |
Polygon (Group *parent, std::list< Point > &points, ItemClient *client=NULL) | |
virtual | ~Polygon () |
void | SetPoints (std::list< Point > &points) |
void | AddPoint (double x, double y) |
double | Distance (double x, double y, Item **item) const |
void | Draw (cairo_t *cr, bool is_vector) const |
virtual void | BuildPath (cairo_t *cr) const |
void | Move (double x, double y) |
Public Member Functions inherited from gccv::FillItem | |
FillItem (Canvas *canvas) | |
FillItem (Group *parent, ItemClient *client=NULL) | |
virtual | ~FillItem () |
void | SetFillColor (GOColor val) |
GOColor | GetFillColor (void) const |
Public Member Functions inherited from gccv::LineItem | |
LineItem (Canvas *canvas) | |
LineItem (Group *parent, ItemClient *client=NULL) | |
virtual | ~LineItem () |
GOColor | GetEffectiveLineColor () const |
void | ApplyLine (cairo_t *cr) const |
void | SetDashes (double const *dashes, int num_dashes, double offset) |
void | SetLineWidth (double val) |
double | GetLineWidth (void) const |
void | SetLineColor (GOColor val) |
GOColor | GetLineColor (void) const |
void | SetAutoColor (bool val) |
bool | GetAutoColor (void) const |
Public Member Functions inherited from gccv::Item | |
Item (Canvas *canvas) | |
Item (Group *parent, ItemClient *client=NULL) | |
virtual | ~Item () |
void | GetBounds (double &x0, double &y0, double &x1, double &y1) const |
void | Invalidate () const |
void | SetVisible (bool visible) |
virtual bool | Draw (cairo_t *cr, double x0, double y0, double x1, double y1, bool is_vector) const |
bool | IsTopLevel () const |
void | SetClient (ItemClient *val) |
ItemClient * | GetClient (void) |
Group const * | GetParent (void) const |
bool | GetVisible (void) const |
void | SetOperator (cairo_operator_t val) |
cairo_operator_t | GetOperator (void) const |
Protected Member Functions | |
void | UpdateBounds () |
Protected Attributes | |
std::list< Point > | m_Points |
gccv::Polygon::Polygon | ( | 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 Polygon inside parent and sets client as its associated ItemClient.
|
virtual |
The destructor.
void gccv::Polygon::AddPoint | ( | double | x, |
double | y | ||
) |
x | horizontal position of the new vertex. |
y | vertical position of the new vertex. |
Apends a new vrtex to the vertices list.
|
virtual |
cr | a cairo_t. |
Builds the cairo path corresponding to the Polygon bounds. Don't draw anything.
Reimplemented from gccv::Item.
|
virtual |
x | horizontal position |
y | vertical position |
item | where to store the Item. |
Implementation of Item::Distance() for the Polygon class. Sets item to this.
Reimplemented from gccv::Item.
|
virtual |
cr | a cairo_t. |
is_vector | whether the cairo_t is a vectorial context. |
Draws the Polygon to cr.
Reimplemented from gccv::Item.
|
virtual |
x | the horizontal deplacement |
y | the vertical deplacement |
Moves the Polygon.
Reimplemented from gccv::Item.
void gccv::Polygon::SetPoints | ( | std::list< Point > & | points | ) |
points | the new vertices positions. |
Sets the vertices for the Polygon instance.
|
protectedvirtual |
Evaluates the Polygon bounds.
Reimplemented from gccv::Item.
|
protected |