Wt: Wt::WCircleArea Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

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:
[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