casa
5.7.0-16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
casa
code
display
DisplayEvents
MultiPolylineToolImpl.h
Go to the documentation of this file.
1
//# Copyright (C) 1999,2000,2001,2002
2
//# Associated Universities, Inc. Washington DC, USA.
3
//#
4
//# This library is free software; you can redistribute it and/or modify it
5
//# under the terms of the GNU Library General Public License as published by
6
//# the Free Software Foundation; either version 2 of the License, or (at your
7
//# option) any later version.
8
//#
9
//# This library is distributed in the hope that it will be useful, but WITHOUT
10
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12
//# License for more details.
13
//#
14
//# You should have received a copy of the GNU Library General Public License
15
//# along with this library; if not, write to the Free Software Foundation,
16
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17
//#
18
//# Correspondence concerning AIPS++ should be addressed as follows:
19
//# Internet email: aips2-request@nrao.edu.
20
//# Postal address: AIPS++ Project Office
21
//# National Radio Astronomy Observatory
22
//# 520 Edgemont Road
23
//# Charlottesville, VA 22903-2475 USA
24
//#
25
//# $Id$
26
27
#ifndef DISPLAY_MULTIPOLYLINETOOLIMPL_H
28
#define DISPLAY_MULTIPOLYLINETOOLIMPL_H
29
30
//# aips includes
31
#include <
casa/aips.h
>
32
#include <
casa/Arrays/Vector.h
>
33
34
//# trial includes
35
36
//# display library includes
37
//#include <display/Display/WorldCanvas.h>
38
#include <
display/DisplayEvents/MultiPolylineTool.h
>
39
#include <
display/region/RegionSourceFactory.h
>
40
41
namespace
casa {
//# NAMESPACE CASA - BEGIN
42
43
// <summary>
44
// WorldCanvas event-based polyline region drawer
45
// </summary>
46
47
// <use visibility=export>
48
49
// <reviewed reviewer="" data="yyyy/mm/dd" tests="" demos="">
50
// </reviewed>
51
52
// <prerequisites>
53
// <li> WCRectTool
54
// </prerequisites>
55
56
57
// <example>
58
// </example>
59
60
61
62
class
MultiPolylineToolImpl
:
public
MultiPolylineTool
{
63
64
public
:
65
66
// Constructor
67
MultiPolylineToolImpl
(
viewer::RegionSourceFactory
*rf,
PanelDisplay
* pd,
Display::KeySym
keysym =
Display::K_Pointer_Button3
);
68
69
// Destructor
70
virtual
~MultiPolylineToolImpl
();
71
72
protected
:
73
74
// Handle double-click inside the polygon. Invokes regionReady().
75
virtual
void
doubleInside
();
76
77
// This function is called when a region is deliberately "finished"
78
// by the user. It can be implemented to do further actions, such
79
// as report the region to the application.
80
virtual
void
regionReady
() { };
81
82
// get the world coords of the current polygon region
83
void
getWorldCoords
(
casacore::Vector<casacore::Double>
&x,
casacore::Vector<casacore::Double>
&y);
84
85
// get the linear coords of the current ploygon region
86
void
getLinearCoords
(
casacore::Vector<casacore::Double>
&x,
casacore::Vector<casacore::Double>
&y);
87
88
};
89
90
91
}
//# NAMESPACE CASA - END
92
93
#endif
casacore::Vector< casacore::Double >
casa::MultiPolylineToolImpl::getWorldCoords
void getWorldCoords(casacore::Vector< casacore::Double > &x, casacore::Vector< casacore::Double > &y)
get the world coords of the current polygon region
MultiPolylineTool.h
casa::MultiPolylineToolImpl::getLinearCoords
void getLinearCoords(casacore::Vector< casacore::Double > &x, casacore::Vector< casacore::Double > &y)
get the linear coords of the current ploygon region
aips.h
casa::MultiPolylineTool
Base class for WorldCanvas event-based polyline tools.
Definition:
MultiPolylineTool.h:82
casa::MultiPolylineToolImpl::MultiPolylineToolImpl
MultiPolylineToolImpl(viewer::RegionSourceFactory *rf, PanelDisplay *pd, Display::KeySym keysym=Display::K_Pointer_Button3)
Constructor.
casa::MultiPolylineToolImpl
WorldCanvas event-based polyline region drawer.
Definition:
MultiPolylineToolImpl.h:62
RegionSourceFactory.h
Vector.h
casa::viewer::RegionSourceFactory
Definition:
RegionSourceFactory.h:11
casa::MultiPolylineToolImpl::doubleInside
virtual void doubleInside()
Handle double-click inside the polygon.
casa::MultiPolylineToolImpl::~MultiPolylineToolImpl
virtual ~MultiPolylineToolImpl()
Destructor.
casa::Display::K_Pointer_Button3
Definition:
DisplayEnums.h:721
casa::MultiPolylineToolImpl::regionReady
virtual void regionReady()
This function is called when a region is deliberately "finished" by the user.
Definition:
MultiPolylineToolImpl.h:80
casa::PanelDisplay
A class which creates and manages "panelled" displays.
Definition:
PanelDisplay.h:79
casa::Display::KeySym
KeySym
Keysyms for PixelCanvas keyboard events.
Definition:
DisplayEnums.h:412
Generated on Sun Sep 1 2019 23:32:31 for casa by
1.8.5