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:
canvas a Canvas.
x0 the triangle top horizontal position.
y0 the triangle top vertical position.
x1 the horizontal position of the canter of the triangle base.
y1 the vertical position of the canter of the triangle base.
width the 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:
parent the Group to which the new Hash will be added.
x0 the triangle top horizontal position.
y0 the triangle top vertical position.
x1 the horizontal position of the canter of the triangle base.
y1 the vertical position of the canter of the triangle base.
width the triangle base width.
client the 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:
cr a cairo_t.
is_vector whether 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:
dist the 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:
width the 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:

Generated on Fri Sep 24 15:58:43 2010 for The Gnome Chemistry Utils by  doxygen 1.5.9