The Gnome Chemistry Utils
0.14.0
|
A drop or leaf item. More...
#include <leaf.h>
Public Member Functions | |
Leaf (Canvas *canvas, double x, double y, double radius) | |
Leaf (Group *parent, double x, double y, double radius, ItemClient *client=NULL) | |
virtual | ~Leaf () |
void | SetPosition (double x, double y) |
void | GetPosition (double &x, double &y) |
void | SetWidthFactor (double factor) |
double | Distance (double x, double y, Item **item) const |
void | Draw (cairo_t *cr, bool is_vector) const |
void | Move (double x, double y) |
void | SetRadius (double val) |
double | GetRadius (void) const |
void | SetRotation (double val) |
double | GetRotation (void) const |
double | GetWidthFactor (void) const |
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 void | BuildPath (cairo_t *cr) const |
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 () |
Additional Inherited Members | |
Protected Attributes inherited from gccv::Item | |
double | m_x0 |
double | m_y0 |
double | m_x1 |
double | m_y1 |
gccv::Leaf::Leaf | ( | Canvas * | canvas, |
double | x, | ||
double | y, | ||
double | radius | ||
) |
gccv::Leaf::Leaf | ( | Group * | parent, |
double | x, | ||
double | y, | ||
double | radius, | ||
ItemClient * | client = NULL |
||
) |
parent | the Group to which the new Leaf will be added. |
x | the leaf origin horizontal position. |
y | the leaf origin vertical position. |
radius | the leaf radius. |
client | the ItemClient for the new Leaf if any. |
Creates a new Leaf inside parent and sets client as its associated ItemClient. The origin is the angular point, and the radius the distance between the origin and the opposite point.
|
virtual |
The destructor.
|
virtual |
x | horizontal position |
y | vertical position |
item | where to store the Item. |
Implementation of Item::Distance() for the Leaf 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 Leaf to cr.
Reimplemented from gccv::Item.
void gccv::Leaf::GetPosition | ( | double & | x, |
double & | y | ||
) |
x | where to store the leaf originhorizontal position. |
y | where to store the leaf origin vertical position. |
Retrieves the position of the leaf origin.
|
inline |
|
inline |
|
inline |
|
virtual |
x | the horizontal deplacement |
y | the vertical deplacement |
Moves the Leaf.
Reimplemented from gccv::Item.
void gccv::Leaf::SetPosition | ( | double | x, |
double | y | ||
) |
x | the new leaf origin horizontal position. |
y | the new leaf origin vertical position. |
Sets the position of the leaf origin.
|
inline |
|
inline |
void gccv::Leaf::SetWidthFactor | ( | double | factor | ) |
factor | the new width factor. |
Sets the width of the leaf relative to its radius. Actually, the width is 0.8 * factor * radius.
|
protectedvirtual |
Evaluates the Leaf bounds.
Reimplemented from gccv::Item.