Wt 3.1.10
Public Member Functions
Wt::WCircleArea Class Reference

A interactive area in a widget, specified by a circle. More...

#include <Wt/WCircleArea>

Inheritance diagram for Wt::WCircleArea:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WCircleArea ()
 Default constructor.
 WCircleArea (int x, int y, int radius)
 Creates a circular area with given geometry.
void setCenter (const WPoint &point)
 Sets the center.
void setCenter (const WPointF &point)
 Sets the center.
void setCenter (int x, int y)
 Sets the center.
int centerX () const
 Returns the center X coordinate.
int centerY () const
 Returns the center Y coordinate.
void setRadius (int radius)
 Sets the radius.
int radius () const
 Returns the radius.

Detailed Description

A interactive area in a widget, specified by a circle.

The area may be added to a WImage or WPaintedWidget to provide interactivity on a circular area of the image. The circle is specified in pixel coordinates.

Usage example:

 Wt::WImage *image = new Wt::WImage("images/events.png", this);
 Wt::WCircleArea *area = new Wt::WCircleArea(20, 30, 15);
 image->addArea(area);

 area->clicked().connect(this, &MyWidget::areaClicked);
See also:
WImage::addArea(), WPaintedWidget::addArea()
WRectArea, WPolygonArea

Constructor & Destructor Documentation

Wt::WCircleArea::WCircleArea ( )

Default constructor.

Specifies a circular area with center (0, 0) and radius 0.

Wt::WCircleArea::WCircleArea ( int  x,
int  y,
int  radius 
)

Creates a circular area with given geometry.

The arguments are in pixel units.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Mon Nov 14 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4