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

Equilateral hashed triangle. More...

#include <hash.h>

Inheritance diagram for gccv::Hash:
gccv::Wedge gccv::Item

Public Member Functions

 Hash (Canvas *canvas, double x0, double y0, double x1, double y1, double width)
 Hash (Group *parent, double x0, double y0, double x1, double y1, double width, ItemClient *client=NULL)
virtual ~Hash ()
void Draw (cairo_t *cr, bool is_vector) const
void SetLineWidth (double val)
double GetLineWidth (void) const
void SetLineDist (double val)
double GetLineDist (void) const
- Public Member Functions inherited from gccv::Wedge
 Wedge (Canvas *canvas, double x0, double y0, double x1, double y1, double width)
 Wedge (Group *parent, double x0, double y0, double x1, double y1, double width, ItemClient *client=NULL)
virtual ~Wedge ()
void SetPosition (double x0, double y0, double x1, double y1)
double Distance (double x, double y, Item **item) const
void Move (double x, double y)
- 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

Additional Inherited Members

- Protected Member Functions inherited from gccv::Wedge
void UpdateBounds ()
- Protected Attributes inherited from gccv::Wedge
double m_xstart
double m_ystart
double m_xend
double m_yend
double m_xe1
double m_ye1
double m_xe2
double m_ye2

Detailed Description

Equilateral hashed triangle.

Equilateral triangle filled with regularly spaced hashes parallel to the triangle base.

Definition at line 40 of file hash.h.

Constructor & Destructor Documentation

gccv::Hash::Hash ( Canvas canvas,
double  x0,
double  y0,
double  x1,
double  y1,
double  width 
)
Parameters
canvasa Canvas.
x0the triangle top horizontal position.
y0the triangle top vertical position.
x1the horizontal position of the canter of the triangle base.
y1the vertical position of the canter of the triangle base.
widththe triangle base width.

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

gccv::Hash::Hash ( Group parent,
double  x0,
double  y0,
double  x1,
double  y1,
double  width,
ItemClient client = NULL 
)
Parameters
parentthe Group to which the new Hash will be added.
x0the triangle top horizontal position.
y0the triangle top vertical position.
x1the horizontal position of the canter of the triangle base.
y1the vertical position of the canter of the triangle base.
widththe triangle base width.
clientthe ItemClient for the new Hash if any.

Creates a new Hash inside parent and sets client as its associated ItemClient.

virtual gccv::Hash::~Hash ( )
virtual

The destructor.

Member Function Documentation

void gccv::Hash::Draw ( cairo_t *  cr,
bool  is_vector 
) const
virtual
Parameters
cra cairo_t.
is_vectorwhether the cairo_t is a vectorial context.

Draws the Hash to cr.

Reimplemented from gccv::Wedge.

gccv::Hash::GetLineDist ( void  ) const
inline
Returns
the distance between two consecutive hashes.

Definition at line 99 of file hash.h.

gccv::Hash::GetLineWidth ( void  ) const
inline
Returns
the width of the hashes.

Definition at line 89 of file hash.h.

gccv::Hash::SetLineDist ( double  dist)
inline
Parameters
distthe new hash distance.

Sets the distance between two consecutive hashes. The periodicity is actually the sum of this distance and the hash width.

Definition at line 99 of file hash.h.

gccv::Hash::SetLineWidth ( double  width)
inline
Parameters
widththe new hash width.

Sets the width of the hashes.

Definition at line 89 of file hash.h.


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