casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
AnnText.h
Go to the documentation of this file.
00001 //# ComponentShape.h: Base class for component shapes
00002 //# Copyright (C) 1998,1999,2000,2001
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: ComponentShape.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $
00027 
00028 #ifndef ANNOTATIONS_ANNTEXT_H
00029 #define ANNOTATIONS_ANNTEXT_H
00030 
00031 #include <imageanalysis/Annotations/AnnotationBase.h>
00032 
00033 namespace casa {
00034 
00035 // <summary>Represents a text annotation</summary>
00036 
00037 // <use visibility=export>
00038 
00039 // <reviewed reviewer="" date="yyyy/mm/dd">
00040 // </reviewed>
00041 
00042 // <synopsis>
00043 
00044 // Represents an ascii text annotation
00045 // </synopsis>
00046 
00047 class AnnText: public AnnotationBase {
00048 public:
00049 
00050         AnnText(
00051                 const Quantity& xPos, const Quantity& yPos,
00052                 const String& dirRefFrameString,
00053                 const CoordinateSystem& csys,
00054                 const String& text,
00055                 const Quantity& beginFreq,
00056                 const Quantity& endFreq,
00057                 const String& freqRefFrame,
00058                 const String& dopplerString,
00059                 const Quantity& restfreq,
00060                 const Vector<Stokes::StokesTypes>& stokes
00061         );
00062 
00063         AnnText(
00064                 const Quantity& xPos, const Quantity& yPos,
00065                 const CoordinateSystem& csys,
00066                 const String& text,
00067                 const Vector<Stokes::StokesTypes>& stokes
00068         );
00069 
00070         // implicit copy constructor and destructor are fine
00071 
00072         AnnText& operator=(const AnnText& other);
00073 
00074         // left most point of text string
00075         MDirection getDirection() const;
00076 
00077         String getText() const;
00078 
00079         virtual ostream& print(ostream &os) const;
00080 
00081 private:
00082         AnnotationBase::Direction _inputDirection;
00083         String _text;
00084 
00085         void _init(const Quantity& x, const Quantity& y);
00086 
00087 };
00088 
00089 }
00090 
00091 #endif