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

Simple arrows class. More...

#include <arrow.h>

Inheritance diagram for gccv::Arrow:
gccv::Line gccv::LineItem gccv::Item

List of all members.

Public Member Functions

 Arrow (Canvas *canvas, double xstart, double ystart, double xend, double yend)
 Arrow (Group *parent, double xstart, double ystart, double xend, double yend, ItemClient *client=NULL)
virtual ~Arrow ()
double Distance (double x, double y, Item **item) const
void Draw (cairo_t *cr, bool is_vector) const

Protected Member Functions

void UpdateBounds ()

Detailed Description

Simple arrows class.

Item class for arrows composed of a straight line with one or both ends decorated with an arrow head.

Definition at line 41 of file gccv/arrow.h.


Constructor & Destructor Documentation

gccv::Arrow::Arrow ( 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 Arrow with a full head at end and no head at start and sets it as a child of the root Group of canvas.

gccv::Arrow::Arrow ( Group parent,
double  xstart,
double  ystart,
double  xend,
double  yend,
ItemClient client = NULL 
)
Parameters:
parentthe Group to which the new Arrow will be added.
xstartthe horizontal start position.
ystartthe vertical start position.
xendthe horizontal end position.
yendthe vertical end position.
clientthe ItemClient for the new Arrow if any.

Creates a new Arrow with a full head at end and no head at start inside parent and sets client as its associated ItemClient.

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

The destructor.


Member Function Documentation

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

Reimplemented from gccv::Line.

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

Draws the Arrow to cr.

Reimplemented from gccv::Line.

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

Evaluates the Arrow bounds.

Reimplemented from gccv::Line.


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