DSCircle.h

Go to the documentation of this file.
00001 //# DSCircle.h: Circle implementation for "DisplayShapes"
00002 //# Copyright (C) 1998,1999,2000,2001,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 #ifndef TRIALDISPLAY_DSCIRCLE_H
00028 #define TRIALDISPLAY_DSCIRCLE_H
00029 
00030 #include <casa/aips.h>
00031 
00032 #include <display/DisplayShapes/DSEllipse.h>
00033 #include <casa/Arrays/Matrix.h>
00034 #include <casa/Arrays/Vector.h>
00035 
00036 
00037 namespace casa { //# NAMESPACE CASA - BEGIN
00038 
00039 // <summary>
00040 // Circle implementation;extends DSEllipse, adding general circle functions
00041 // </summary>
00042 //
00043 // <prerequisite>
00044 // <li> <linkto class="DSEllipse">DSEllipse</linkto>
00045 // <li> <linkto class="DisplayShape">DisplayShape</linkto>
00046 // </prerequisite>
00047 //
00048 // <etymology>
00049 // DSCircle is a method of managing the drawing of a circle onto a PixelCanvas.
00050 // </etymology>
00051 //
00052 // <synopsis>
00053 // DSCircle simply extends from DSEllipse, and adds some general circle
00054 // functionality. It basically replaces the set major and set minor axis
00055 // functions with a setRadius function. Almost all of the functionality
00056 // is contained in DSEllipse.
00057 //
00058 // There are generally two ways to make DisplayShape(s); To create them in
00059 // "one hit" by providing arguments to the constructor, or by using the
00060 // default constructor and then the "setOptions" method. A simple interface
00061 // for all classes inheriting from the
00062 // <linkto class="DisplayShape">DisplayShape</linkto> class is provided by
00063 // <linkto class="DisplayShapeInterface">DisplayShapeInterface</linkto>.
00064 // </synopsis>
00065 //
00066 // <motivation>
00067 // To enable display of circles onto a pixel canvas.
00068 // </motivation>
00069 //
00070 // <example>
00071 // <srcblock>
00072 // </srcblock>
00073 // </example>
00074 
00075 
00076 
00077         class DSCircle : public DSEllipse {
00078 
00079         public:
00080 
00081                 // Constructors and destructors.
00082                 // <group>
00083                 DSCircle();
00084                 DSCircle(const Float& xPos, const Float& yPos, const Float& radius,
00085                          const Bool& hasHandles, const Bool& drawHandles);
00086                 DSCircle(const DSCircle& other);
00087                 virtual ~DSCircle();
00088                 // </group>
00089 
00090                 // General DisplayShape functionality
00091                 // <group>
00092                 virtual void rotate(const Float& /*angle*/) {};
00093                 virtual void setCenter(const Float& xPos, const Float& yPos);
00094                 virtual Bool inObject(const Float& dX, const Float& dY);
00095                 virtual void changePoint(const Vector<Float>& newPos);
00096                 virtual void changePoint(const Vector<Float>& newPos, const Int nPoint);
00097                 // </group>
00098 
00099                 // Circle specific functionality
00100                 // <group>
00101                 virtual void setRadius(const Float& radius);
00102                 virtual void setMajorAxis(const Float& /*major*/) {};
00103                 virtual void setMinorAxis(const Float& /*minor*/) {};
00104                 // </group>
00105 
00106                 // Get and set options
00107                 // <group>
00108                 virtual Bool setOptions(const Record& settings);
00109                 virtual Record getOptions();
00110                 // </group>
00111 
00112         private:
00113                 // Function to set defaults when default constructor called
00114                 virtual void setDefaultOptions();
00115 
00116         };
00117 
00118 } //# NAMESPACE CASA - END
00119 
00120 #endif
00121 
00122 
00123 
00124 
00125 
00126 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1