The Gnome Chemistry Utils 0.13.3
Public Member Functions | Protected Member Functions
gccv::Wedge Class Reference

Equilateral triangle. More...

#include <wedge.h>

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

List of all members.

Public Member Functions

 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 Draw (cairo_t *cr, bool is_vector) const
void Move (double x, double y)

Protected Member Functions

void UpdateBounds ()

Detailed Description

Equilateral triangle.

Filled equilateral triangle.

Definition at line 39 of file wedge.h.


Constructor & Destructor Documentation

gccv::Wedge::Wedge ( 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 Wedge and sets it as a child of the root Group of canvas.

gccv::Wedge::Wedge ( Group parent,
double  x0,
double  y0,
double  x1,
double  y1,
double  width,
ItemClient client = NULL 
)
Parameters:
parentthe Group to which the new Wedge 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 Wedge if any.

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

virtual gccv::Wedge::~Wedge ( ) [virtual]

The destructor.


Member Function Documentation

double gccv::Wedge::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 Wedge class. Sets item to this.

Reimplemented from gccv::Item.

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

Draws the Wedge to cr.

Reimplemented from gccv::Item.

Reimplemented in gccv::Hash.

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

Moves the Wedge.

Reimplemented from gccv::Item.

void gccv::Wedge::SetPosition ( double  x0,
double  y0,
double  x1,
double  y1 
)
Parameters:
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.

Setes the new position for the Wedge instance.

void gccv::Wedge::UpdateBounds ( ) [protected, virtual]

Evaluates the Wedge bounds.

Reimplemented from gccv::Item.


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