casa
$Rev:20696$
|
00001 //# DisplayShapes.h: The DisplayShapes module - AIPS++ general drawing utils 00002 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2002 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id: 00027 00028 #ifndef TRIALDISPLAY_DISPLAYSHAPES_H 00029 #define TRIALDISPLAY_DISPLAYSHAPES_H 00030 00031 namespace casa { //# NAMESPACE CASA - BEGIN 00032 00033 // <module> 00034 // 00035 // <summary> 00036 // A module providing classes to draw general shapes onto a pixel canvas. 00037 // </summary> 00038 // 00039 // <use visibility=export> 00040 // 00041 // <reviewed reviewer="None yet" date="yyyy/mm/dd" demos=""> 00042 // </reviewed> 00043 // 00044 // <prerequisite> 00045 // <li> <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto> 00046 // <li> <linkto class="DisplayShape">DisplayShape</linkto> 00047 // <li> <linkto class="Annotations">Annotations</linkto> 00048 // </prerequisite> 00049 // 00050 // <etymology> 00051 // The module provides various classes that are responsible for 00052 // "drawing" "shapes" 00053 // </etymology> 00054 // 00055 // <synopsis> 00056 // 00057 // <h3>Motivation</h3> 00058 // 00059 // The motivation behind creation of a set of "DisplayShapes" was to enable 00060 // a convinient way to draw basic shapes which would be general enough 00061 // to use anywhere in AIPS++. The most obvious application is for use as 00062 // Annotations. 00063 // 00064 // The shape objects themselves draw onto a pixelcanvas whenever it is 00065 // passed to them. The have no event handling facilites, this must be 00066 // handled by an outside class. <linkto class="Annotations">Annotations 00067 // </linkto> is an example of such a class. It adds mouse handling etc 00068 // and manages a list of shapes. 00069 // 00070 // <h3>The DisplayShapes</h3> 00071 // 00072 // DisplayShapes use <linkto class="PixelCanvas">PixelCanvas</linkto> 00073 // primitives to draw themselves. They act as wrappers for primitives, 00074 // and allow every shape to have a common interface. All DisplayShapes, 00075 // for example have a "move" function. Such a function, when combined 00076 // with others such as "inObject", enable mouse interactions to be far 00077 // simpler than they would using pixelcanvas primitives. An interface 00078 // class is also provided, called 00079 // <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto>. 00080 // This class is another layer on top of the DisplayShapes which uses 00081 // records to further simplify the interface between many different types of 00082 // shapes. The overall aim of the DisplayShapes is to present all shapes 00083 // as a single "DisplayShapeInterface" object. 00084 // 00085 // <h3>Adding a new shape </h3> 00086 // 00087 // The first place a new shape must be added is as a class in the display 00088 // shapes directory. This class should inherit from the base class, 00089 // <linkto class="DisplayShape">DisplayShape</linkto>, or some other class 00090 // which in turn inherits from it. Examples of appropriate classes would 00091 // be <linkto class="DSBasic">DSBasic</linkto> or 00092 // <linkto class="DSClosed">DSClosed</linkto>. 00093 // <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto> 00094 // must also be made aware of the new shape, so it can properly construct 00095 // it if requested. If the shape is to be used for annotations, it must 00096 // be added, along with any special event handling requirements to the 00097 // <linkto class="Annotations">Annotations</linkto> class. 00098 // 00099 // <h3>Using the DisplayShapeInterface</h3> 00100 // 00101 // Regardless of how much functionality the shapes share, there will 00102 // always be a need to apply different options for different shapes. The 00103 // information below is intended to outline the options available for all 00104 // displayshapes. 00105 // 00106 // The below listed options are passed via Records to various shapes. This 00107 // occurs either via get/set options, or via the constructor of 00108 // DisplayShapeInterface. 00109 // 00110 // 00111 // General Options : 00112 // 00113 // <center> 00114 // <table> 00115 // <TR> 00116 // <h2> <TD> Record Entry </TD> <TD> Allowed Data </TD> <TD> Desc. </TD> </h2> 00117 // </TR> 00118 // <TR> 00119 // <TD> hashandles </TD> <TD> Boolean </TD> <TD> Will the object ever have 00120 // handles? No calculations will be done regarding handle position if this is 00121 // false - This is different to drawhandles. hashandles should only be set 00122 // under definate circumstances - i.e. when a shape is being used as a handle 00123 // or for a marker, which will never have a handle.</TD> 00124 // </TR> 00125 // <TR> 00126 // <TD> drawhandles </TD> <TD> Boolean </TD> <TD> Should handles be drawn 00127 // currently? </TD> 00128 // </TR> 00129 // <TR> 00130 // <TD> handlecolor </TD> <TD> String </TD> <TD> Specify the color of the 00131 // handles </TD> 00132 // </TR> 00133 // <TR> 00134 // <TD> handlestyle </TD> <TD> DisplayShape::HandleShape </TD> <TD> The 00135 // of shape to use for the handles </TD> 00136 // </TR> 00137 // <TR> 00138 // <TD> handlesize </TD> <TD> Int </TD> <TD> The size of the handles in 00139 // pixels (radius / height) </TD> 00140 // </TR> 00141 // <TR> 00142 // <TD> color </TD> <TD> String </TD> <TD> The color of the displayshape 00143 // object</TD> 00144 // </TR> 00145 // </table> 00146 // 00147 // </center> 00148 // </synopsis> 00149 // 00150 // 00151 // Record fields specific to individual shapes should be documentented in 00152 // their respective header files. 00153 // 00154 // <todo asof='2002/05/13'> 00155 // <li> The "rotateAbout" functionality is currently not implemented 00156 // </todo> 00157 // </module> 00158 00159 00160 } //# NAMESPACE CASA - END 00161 00162 #endif 00163 00164