|
The Gnome Chemistry Utils 0.12.8
|
#include <squiggle.h>
Public Member Functions | |
| Squiggle (Canvas *canvas, double xstart, double ystart, double xend, double yend) | |
| Squiggle (Group *parent, double xstart, double ystart, double xend, double yend, ItemClient *client=NULL) | |
| virtual | ~Squiggle () |
| 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) |
| void | SetWidth (double val) |
| double | GetWidth (void) const |
| void | SetStep (double val) |
| double | GetStep (void) const |
Protected Member Functions | |
| void | UpdateBounds () |
Squiggle line.
A Squiggle is a line oscillating periodically.
Definition at line 39 of file squiggle.h.
| gccv::Squiggle::Squiggle | ( | Canvas * | canvas, |
| double | xstart, | ||
| double | ystart, | ||
| double | xend, | ||
| double | yend | ||
| ) |
| gccv::Squiggle::Squiggle | ( | Group * | parent, |
| double | xstart, | ||
| double | ystart, | ||
| double | xend, | ||
| double | yend, | ||
| ItemClient * | client = NULL |
||
| ) |
| parent | the Group to which the new Squiggle 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 Squiggle if any. |
Creates a new Squiggle inside parent and sets client as its associated ItemClient.
| virtual gccv::Squiggle::~Squiggle | ( | ) | [virtual] |
The destructor.
| double gccv::Squiggle::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 Squiggle class. Sets item to this.
Reimplemented from gccv::Item.
| void gccv::Squiggle::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 Squiggle to cr.
Reimplemented from gccv::Item.
| gccv::Squiggle::GetStep | ( | void | ) | const [inline] |
Definition at line 132 of file squiggle.h.
| gccv::Squiggle::GetWidth | ( | void | ) | const [inline] |
Definition at line 123 of file squiggle.h.
| void gccv::Squiggle::Move | ( | double | x, |
| double | y | ||
| ) | [virtual] |
| x | the horizontal deplacement |
| y | the vertical deplacement |
Moves the Squiggle.
Reimplemented from gccv::Item.
| void gccv::Squiggle::SetPosition | ( | double | xstart, |
| double | ystart, | ||
| double | xend, | ||
| double | yend | ||
| ) |
| 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 Squiggle position.
| gccv::Squiggle::SetStep | ( | double | step | ) | [inline] |
| step | the periodicity. |
Sets the Squiggle line oscillations periodicity.
Definition at line 132 of file squiggle.h.
| gccv::Squiggle::SetWidth | ( | double | width | ) | [inline] |
| width | the amplitude. |
Sets the Squiggle line oscillations amplitude.
Definition at line 123 of file squiggle.h.
| void gccv::Squiggle::UpdateBounds | ( | ) | [protected, virtual] |
Evaluates the Squiggle bounds.
Reimplemented from gccv::Item.
1.7.4