The Gnome Chemistry Utils 0.13.3
Public Member Functions
gccv::Hash Class Reference

Equilateral hashed triangle. More...

#include <hash.h>

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

List of all members.

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

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: