casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DisplayShapes.h
Go to the documentation of this file.
1 //# DisplayShapes.h: The DisplayShapes module - AIPS++ general drawing utils
2 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2002
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id:
27 
28 #ifndef TRIALDISPLAY_DISPLAYSHAPES_H
29 #define TRIALDISPLAY_DISPLAYSHAPES_H
30 
31 namespace casa { //# NAMESPACE CASA - BEGIN
32 
33 // <module>
34 //
35 // <summary>
36 // A module providing classes to draw general shapes onto a pixel canvas.
37 // </summary>
38 //
39 // <use visibility=export>
40 //
41 // <reviewed reviewer="None yet" date="yyyy/mm/dd" demos="">
42 // </reviewed>
43 //
44 // <prerequisite>
45 // <li> <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto>
46 // <li> <linkto class="DisplayShape">DisplayShape</linkto>
47 // <li> <linkto class="Annotations">Annotations</linkto>
48 // </prerequisite>
49 //
50 // <etymology>
51 // The module provides various classes that are responsible for
52 // "drawing" "shapes"
53 // </etymology>
54 //
55 // <synopsis>
56 //
57 // <h3>Motivation</h3>
58 //
59 // The motivation behind creation of a set of "DisplayShapes" was to enable
60 // a convinient way to draw basic shapes which would be general enough
61 // to use anywhere in AIPS++. The most obvious application is for use as
62 // Annotations.
63 //
64 // The shape objects themselves draw onto a pixelcanvas whenever it is
65 // passed to them. The have no event handling facilites, this must be
66 // handled by an outside class. <linkto class="Annotations">Annotations
67 // </linkto> is an example of such a class. It adds mouse handling etc
68 // and manages a list of shapes.
69 //
70 // <h3>The DisplayShapes</h3>
71 //
72 // DisplayShapes use <linkto class="PixelCanvas">PixelCanvas</linkto>
73 // primitives to draw themselves. They act as wrappers for primitives,
74 // and allow every shape to have a common interface. All DisplayShapes,
75 // for example have a "move" function. Such a function, when combined
76 // with others such as "inObject", enable mouse interactions to be far
77 // simpler than they would using pixelcanvas primitives. An interface
78 // class is also provided, called
79 // <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto>.
80 // This class is another layer on top of the DisplayShapes which uses
81 // records to further simplify the interface between many different types of
82 // shapes. The overall aim of the DisplayShapes is to present all shapes
83 // as a single "DisplayShapeInterface" object.
84 //
85 // <h3>Adding a new shape </h3>
86 //
87 // The first place a new shape must be added is as a class in the display
88 // shapes directory. This class should inherit from the base class,
89 // <linkto class="DisplayShape">DisplayShape</linkto>, or some other class
90 // which in turn inherits from it. Examples of appropriate classes would
91 // be <linkto class="DSBasic">DSBasic</linkto> or
92 // <linkto class="DSClosed">DSClosed</linkto>.
93 // <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto>
94 // must also be made aware of the new shape, so it can properly construct
95 // it if requested. If the shape is to be used for annotations, it must
96 // be added, along with any special event handling requirements to the
97 // <linkto class="Annotations">Annotations</linkto> class.
98 //
99 // <h3>Using the DisplayShapeInterface</h3>
100 //
101 // Regardless of how much functionality the shapes share, there will
102 // always be a need to apply different options for different shapes. The
103 // information below is intended to outline the options available for all
104 // displayshapes.
105 //
106 // The below listed options are passed via Records to various shapes. This
107 // occurs either via get/set options, or via the constructor of
108 // DisplayShapeInterface.
109 //
110 //
111 // General Options :
112 //
113 // <center>
114 // <table>
115 // <TR>
116 // <h2> <TD> casacore::Record Entry </TD> <TD> Allowed casacore::Data </TD> <TD> Desc. </TD> </h2>
117 // </TR>
118 // <TR>
119 // <TD> hashandles </TD> <TD> Boolean </TD> <TD> Will the object ever have
120 // handles? No calculations will be done regarding handle position if this is
121 // false - This is different to drawhandles. hashandles should only be set
122 // under definate circumstances - i.e. when a shape is being used as a handle
123 // or for a marker, which will never have a handle.</TD>
124 // </TR>
125 // <TR>
126 // <TD> drawhandles </TD> <TD> Boolean </TD> <TD> Should handles be drawn
127 // currently? </TD>
128 // </TR>
129 // <TR>
130 // <TD> handlecolor </TD> <TD> casacore::String </TD> <TD> Specify the color of the
131 // handles </TD>
132 // </TR>
133 // <TR>
134 // <TD> handlestyle </TD> <TD> DisplayShape::HandleShape </TD> <TD> The
135 // of shape to use for the handles </TD>
136 // </TR>
137 // <TR>
138 // <TD> handlesize </TD> <TD> casacore::Int </TD> <TD> The size of the handles in
139 // pixels (radius / height) </TD>
140 // </TR>
141 // <TR>
142 // <TD> color </TD> <TD> casacore::String </TD> <TD> The color of the displayshape
143 // object</TD>
144 // </TR>
145 // </table>
146 //
147 // </center>
148 // </synopsis>
149 //
150 //
151 // casacore::Record fields specific to individual shapes should be documentented in
152 // their respective header files.
153 //
154 // <todo asof='2002/05/13'>
155 // <li> The "rotateAbout" functionality is currently not implemented
156 // </todo>
157 // </module>
158 
159 
160 } //# NAMESPACE CASA - END
161 
162 #endif
163 
164