|
The Gnome Chemistry Utils
0.14.6
|
Rectangles. More...
#include <rectangle.h>
Public Member Functions | |
| Rectangle (Canvas *canvas, double x, double y, double width, double height) | |
| Rectangle (Group *parent, double x, double y, double width, double height, ItemClient *client=NULL) | |
| virtual | ~Rectangle () |
| void | SetPosition (double x, double y, double width, double height) |
| void | GetPosition (double &x, double &y) const |
| void | GetPosition (double &x, double &y, double &width, double &height) const |
| double | Distance (double x, double y, Item **item) const |
| void | Draw (cairo_t *cr, bool is_vector) 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 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 () |
Protected Member Functions inherited from gccv::Item | |
| void | BoundsChanged () |
| Canvas const * | GetCanvas () const |
Additional Inherited Members | |
Protected Attributes inherited from gccv::Item | |
| double | m_x0 |
| double | m_y0 |
| double | m_x1 |
| double | m_y1 |
Rectangles.
Implements rectangular, optionally filled, items.
Definition at line 39 of file rectangle.h.
| gccv::Rectangle::Rectangle | ( | Canvas * | canvas, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height | ||
| ) |
| gccv::Rectangle::Rectangle | ( | Group * | parent, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height, | ||
| ItemClient * | client = NULL |
||
| ) |
| parent | the Group to which the new Text will be added. |
| x | the top left corner horizontal position. |
| y | the top left corner vertical position. |
| width | the rectangle width. |
| height | the rectangle height. |
| client | the ItemClient for the new Text if any. |
Creates a new Rectangle inside parent and sets client as its associated ItemClient.
|
virtual |
The destructor.
|
virtual |
| x | horizontal position |
| y | vertical position |
| item | where to store the Item. |
Implementation of Item::Distance() for the Rectangle 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 Rectangle to cr.
Reimplemented from gccv::Item.
Reimplemented in gccv::Text.
| void gccv::Rectangle::GetPosition | ( | double & | x, |
| double & | y | ||
| ) | const |
| x | where to store the top left corner horizontal position. |
| y | where to store the top left corner vertical position. |
Retrieves the position the Rectangle.
| void gccv::Rectangle::GetPosition | ( | double & | x, |
| double & | y, | ||
| double & | width, | ||
| double & | height | ||
| ) | const |
| x | where to store the top left corner horizontal position. |
| y | where to store the top left corner vertical position. |
| width | where to store the rectangle width. |
| height | where to store the rectangle height. |
Retrieves the position and size of the Rectangle.
|
virtual |
| x | the horizontal deplacement |
| y | the vertical deplacement |
Moves the Rectangle.
Reimplemented from gccv::Item.
Reimplemented in gccv::Text.
| void gccv::Rectangle::SetPosition | ( | double | x, |
| double | y, | ||
| double | width, | ||
| double | height | ||
| ) |
| x | the top left corner new horizontal position. |
| y | the top left corner new vertical position. |
| width | the rectangle new width. |
| height | the rectangle new height. |
Sets the position and size of the Rectangle.
|
protectedvirtual |
Evaluates the Rectangle bounds.
Reimplemented from gccv::Item.
1.8.6