casa
$Rev:20696$
|
WorldCanvas event-based polygon region drawer. More...
#include <MultiPolyToolImpl.h>
Public Member Functions | |
MultiPolyToolImpl (viewer::RegionSourceFactory *rf, PanelDisplay *pd, Display::KeySym keysym=Display::K_Pointer_Button3) | |
Constructor. | |
virtual | ~MultiPolyToolImpl () |
Destructor. | |
Protected Member Functions | |
virtual void | doubleInside () |
Handle double-click inside the polygon. | |
virtual void | regionReady () |
This function is called when a region is deliberately "finished" by the user. | |
void | getWorldCoords (Vector< Double > &x, Vector< Double > &y) |
get the world coords of the current polygon region | |
void | getLinearCoords (Vector< Double > &x, Vector< Double > &y) |
get the linear coords of the current ploygon region |
WorldCanvas event-based polygon region drawer.
Public interface
<prerequisites> WCRectTool </prerequisites>
WCPTRegion stands for WorldCanvas Polygon Tool Region
This class finalises the functionality in WCRectTool to implement event-based drawing of polygonal regions on a WorldCanvas. Double clicking inside the constructed polygon emits the region, whilst pressing Escape cancels the region.
Polygonal regions are the most common regions, and constructing them visually can be very efficient.
Definition at line 80 of file MultiPolyToolImpl.h.
casa::MultiPolyToolImpl::MultiPolyToolImpl | ( | viewer::RegionSourceFactory * | rf, |
PanelDisplay * | pd, | ||
Display::KeySym | keysym = Display::K_Pointer_Button3 |
||
) |
Constructor.
virtual casa::MultiPolyToolImpl::~MultiPolyToolImpl | ( | ) | [virtual] |
Destructor.
virtual void casa::MultiPolyToolImpl::doubleInside | ( | ) | [protected, virtual] |
Handle double-click inside the polygon.
Invokes regionReady().
Reimplemented from casa::MultiPolyTool.
void casa::MultiPolyToolImpl::getLinearCoords | ( | Vector< Double > & | x, |
Vector< Double > & | y | ||
) | [protected] |
get the linear coords of the current ploygon region
void casa::MultiPolyToolImpl::getWorldCoords | ( | Vector< Double > & | x, |
Vector< Double > & | y | ||
) | [protected] |
get the world coords of the current polygon region
virtual void casa::MultiPolyToolImpl::regionReady | ( | ) | [inline, protected, virtual] |
This function is called when a region is deliberately "finished" by the user.
It can be implemented to do further actions, such as report the region to the application.
Reimplemented in casa::QtPTRegion.
Definition at line 98 of file MultiPolyToolImpl.h.