Wt::WPolygonArea Class Reference

An interactive area in a widget, specified by a polygon. More...

#include <Wt/WPolygonArea>

Inheritance diagram for Wt::WPolygonArea:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WPolygonArea ()
 Default constructor.
 WPolygonArea (const std::vector< WPoint > &points)
 Construct a polygon area with given vertices.
 WPolygonArea (const std::vector< WPointF > &points)
 Construct a polygon area with given vertices.
void addPoint (int x, int y)
 Add a point.
void addPoint (const WPoint &point)
 Add a point.
void addPoint (const WPointF &point)
 Add a point.
void setPoints (const std::vector< WPoint > &points)
 Set the polygon vertices.
void setPoints (const std::vector< WPointF > &points)
 Set the polygon vertices.
const std::vector< WPoint > & points () const
 Returns the polygon vertices.


Detailed Description

An interactive area in a widget, specified by a polygon.

The area may be added to a WImage or WPaintedWidget. The polygon is specified in pixel coordinates, and uses an even-odd winding rule (overlaps create holes).

See also:
WImage::addArea(), WPaintedWidget::addArea()

WCircleArea, WRectArea


Constructor & Destructor Documentation

Wt::WPolygonArea::WPolygonArea (  ) 

Default constructor.

Defines an empty polygon.

Wt::WPolygonArea::WPolygonArea ( const std::vector< WPoint > &  points  ) 

Construct a polygon area with given vertices.

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

Wt::WPolygonArea::WPolygonArea ( const std::vector< WPointF > &  points  ) 

Construct a polygon area with given vertices.

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.


Member Function Documentation

void Wt::WPolygonArea::setPoints ( const std::vector< WPoint > &  points  ) 

Set the polygon vertices.

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

void Wt::WPolygonArea::setPoints ( const std::vector< WPointF > &  points  ) 

Set the polygon vertices.

The polygon is defined with vertices corresponding to points. The polygon is closed by connecting the last point with the first point.

const std::vector<WPoint>& Wt::WPolygonArea::points (  )  const [inline]

Returns the polygon vertices.

See also:
setPoints()


Generated on Fri Apr 24 16:26:00 2009 for Wt by doxygen 1.5.6