The Gnome Chemistry Utils  0.14.0
Public Member Functions | Protected Member Functions | List of all members
gccv::Squiggle Class Reference

Squiggle line. More...

#include <squiggle.h>

Inheritance diagram for gccv::Squiggle:
gccv::LineItem gccv::Item

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
- 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)
ItemClientGetClient (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

Detailed Description

Squiggle line.

A Squiggle is a line oscillating periodically.

Definition at line 39 of file squiggle.h.

Constructor & Destructor Documentation

gccv::Squiggle::Squiggle ( Canvas canvas,
double  xstart,
double  ystart,
double  xend,
double  yend 
)
Parameters
canvasa Canvas.
xstartthe horizontal start position.
ystartthe vertical start position.
xendthe horizontal end position.
yendthe vertical end position.

Creates a new Squiggle sets it as a child of the root Group of canvas.

gccv::Squiggle::Squiggle ( Group parent,
double  xstart,
double  ystart,
double  xend,
double  yend,
ItemClient client = NULL 
)
Parameters
parentthe Group to which the new Squiggle will be added.
xstartthe horizontal start position.
ystartthe vertical start position.
xendthe horizontal end position.
yendthe vertical end position.
clientthe 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.

Member Function Documentation

double gccv::Squiggle::Distance ( double  x,
double  y,
Item **  item 
) const
virtual
Parameters
xhorizontal position
yvertical position
itemwhere 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
Parameters
cra cairo_t.
is_vectorwhether the cairo_t is a vectorial context.

Draws the Squiggle to cr.

Reimplemented from gccv::Item.

gccv::Squiggle::GetStep ( void  ) const
inline
Returns
the Squiggle line oscillations periodicity.

Definition at line 132 of file squiggle.h.

gccv::Squiggle::GetWidth ( void  ) const
inline
Returns
the Squiggle line oscillations amplitude.

Definition at line 123 of file squiggle.h.

void gccv::Squiggle::Move ( double  x,
double  y 
)
virtual
Parameters
xthe horizontal deplacement
ythe vertical deplacement

Moves the Squiggle.

Reimplemented from gccv::Item.

void gccv::Squiggle::SetPosition ( double  xstart,
double  ystart,
double  xend,
double  yend 
)
Parameters
xstartthe new horizontal start position.
ystartthe new vertical start position.
xendthe new horizontal end position.
yendthe new vertical end position.

Sets the Squiggle position.

gccv::Squiggle::SetStep ( double  step)
inline
Parameters
stepthe periodicity.

Sets the Squiggle line oscillations periodicity.

Definition at line 132 of file squiggle.h.

gccv::Squiggle::SetWidth ( double  width)
inline
Parameters
widththe amplitude.

Sets the Squiggle line oscillations amplitude.

Definition at line 123 of file squiggle.h.

void gccv::Squiggle::UpdateBounds ( )
protectedvirtual

Evaluates the Squiggle bounds.

Reimplemented from gccv::Item.


The documentation for this class was generated from the following file: