gccv::PolyLine Class Reference

Multi-segments line. More...

#include <poly-line.h>

Inheritance diagram for gccv::PolyLine:

gccv::LineItem gccv::Item

List of all members.

Public Member Functions

 PolyLine (Canvas *canvas, std::list< Point > &points)
 PolyLine (Group *parent, std::list< Point > &points, ItemClient *client=NULL)
virtual ~PolyLine ()
void SetPoints (std::list< Point > &points)
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 ()

Protected Attributes

std::list< Pointm_Points


Detailed Description

Multi-segments line.

Line item with several linear segments.

Definition at line 41 of file poly-line.h.


Constructor & Destructor Documentation

gccv::PolyLine::PolyLine ( Canvas canvas,
std::list< Point > &  points 
)

Parameters:
canvas a Canvas.
points the vertices positions.
Creates a new PolyLine sets it as a child of the root Group of canvas.

gccv::PolyLine::PolyLine ( Group parent,
std::list< Point > &  points,
ItemClient client = NULL 
)

Parameters:
parent the Group to which the new PolyLine will be added.
points the vertices positions.
client the ItemClient for the new PolyLine if any.
Creates a new PolyLine inside parent and sets client as its associated ItemClient.

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

The destructor.


Member Function Documentation

double gccv::PolyLine::Distance ( double  x,
double  y,
Item **  item 
) const [virtual]

Parameters:
x horizontal position
y vertical position
item where to store the Item.
Implementation of Item::Distance() for the PolyLine class. Sets item to this.

Reimplemented from gccv::Item.

void gccv::PolyLine::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 PolyLine to cr.

Reimplemented from gccv::Item.

void gccv::PolyLine::Move ( double  x,
double  y 
) [virtual]

Parameters:
x the horizontal deplacement
y the vertical deplacement
Moves the PolyLine.

Reimplemented from gccv::Item.

void gccv::PolyLine::SetPoints ( std::list< Point > &  points  ) 

Parameters:
points the new vertices positions.
Sets the vertices for the PolyLine instance.

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

Evaluates the PolyLine bounds.

Reimplemented from gccv::Item.


Member Data Documentation

std::list<Point> gccv::PolyLine::m_Points [protected]

The PolyLine vertices.

Definition at line 106 of file poly-line.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