casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
DSClosed.h
Go to the documentation of this file.
00001 //# DSClosed.h: Base class for all 'closed' 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 
00028 #ifndef TRIALDISPLAY_DSCLOSED_H
00029 #define TRIALDISPLAY_DSCLOSED_H
00030 
00031 
00032 #include <casa/aips.h>
00033 
00034 #include <display/DisplayShapes/DSBasic.h> 
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 // <summary>
00039 // DSClosed provides common functionality for all "closed" shapes.
00040 // </summary>
00041 //
00042 // <prerequisite>
00043 // <li> <linkto class="DSBasic">DSBasic</linkto>
00044 // <li> <linkto class="DisplayShape">DisplayShape</linkto>
00045 // </prerequisite>
00046 //
00047 // <etymology>
00048 // DSClosed is used to provide a common interface for all closed shapes
00049 // </etymology>
00050 //
00051 // <synopsis>
00052 // DSClosed simply manages the fill options of any closed display shapes. 
00053 // </synopsis>
00054 //
00055 // <motivation>
00056 // A desire for a common interface for all closed shapes.
00057 // </motivation>
00058 //
00059 // <example>
00060 // <srcblock>
00061 // </srcblock>
00062 // </example>
00063 
00064 class DSClosed : public DSBasic {
00065 
00066 public:
00067 
00068   // Type of fill to use.
00069   enum FillStyle {No_Fill, Full_Fill};
00070 
00071   // Constructors and destructors
00072   // <group>
00073   DSClosed();
00074   DSClosed(const DSClosed& other);
00075   
00076   virtual ~DSClosed();
00077   // </group>
00078 
00079   // Get / Set fill options
00080   // <group>
00081   virtual void setFillStyle(DSClosed::FillStyle fill);
00082   virtual DSClosed::FillStyle getFillStyle();
00083   virtual void setFillColor(String color);
00084   virtual String getFillColor();
00085   // </group>
00086 
00087 
00088   // General DisplayShape functions. The non abstract functions in this group
00089   // simply pass on calls up the class tree.
00090   // <group>
00091   virtual void draw(PixelCanvas *pc);
00092   virtual void rotateAbout(const Float& angle, const Float& aboutX, 
00093                            const Float& aboutY);
00094   virtual void move(const Float& dX, const Float& dY);
00095   // </group>
00096 
00097   // Get and set options
00098   // <group>
00099   virtual Record getOptions();
00100   virtual Bool setOptions(const Record& settings);
00101   // </group>
00102 
00103 private:
00104 
00105   // Used to set up the class when default constructor called
00106   virtual void setDefaultOptions();
00107   DSClosed::FillStyle itsFillStyle;
00108   String itsFillColor;
00109   
00110 };
00111 
00112 } //# NAMESPACE CASA - END
00113 
00114 #endif
00115 
00116 
00117 
00118