casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DSBasic.h
Go to the documentation of this file.
1 //# DSBasic.h: Basically, a base class for any shape which can be drawn with
2 //# primitive lines.
3 //# Copyright (C) 1998,1999,2000,2001,2002
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be addressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 //# $Id:
28 
29 #ifndef TRIALDISPLAY_DSBASIC_H
30 #define TRIALDISPLAY_DSBASIC_H
31 
32 #include <casa/aips.h>
33 
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38  template <class T> class DParameterRange;
39 
40 // <summary>
41 // Base class for all "basic" shapes
42 // </summary>
43 //
44 // <prerequisite>
45 // <li> <linkto class="DisplayShape">DisplayShape</linkto>
46 // </prerequisite>
47 //
48 // <etymology>
49 // DSBasic is a base for all basic classes, it manages linewidth.
50 // </etymology>
51 //
52 // <synopsis>
53 // DSBasic is a base class for any shape using basic lines to draw it self,
54 // i.e. shapes such as lines, circles and polygons should extend this class.
55 // More complex DisplayShapes, e.g. text should not.
56 //
57 // <motivation>
58 // A common interface for the setting of linewidths
59 // </motivation>
60 //
61 // <example>
62 // <srcblock>
63 //
64 // </srcblock>
65 // </example>
66 
67 
68  class DSBasic : public DisplayShape {
69 
70  public:
71 
72  // Default constructor
73  DSBasic();
74 
75  // Copy constructor
76  DSBasic(const DSBasic& other);
77 
78  // Destructor
79  virtual ~DSBasic();
80 
81  // Manage line width
82  // <group>
83  virtual void setLineWidth(const casacore::Int pixels);
84  virtual casacore::Int getLineWidth();
85  // </group>
86 
87  // Standard fns
88  // <group>
89  virtual void draw(PixelCanvas* pc);
90  virtual void rotateAbout(const casacore::Float& angle, const casacore::Float& aboutX,
91  const casacore::Float& aboutY);
92  virtual void move(const casacore::Float& dX, const casacore::Float& dY);
93  virtual casacore::Record getOptions();
94  virtual casacore::Bool setOptions(const casacore::Record& settings);
95  // </group>
96 
97  private:
98 
100 
101  };
102 
103 
104 } //# NAMESPACE CASA - END
105 
106 #endif
107 
108 
109 
110 
111 
112 
DParameterRange< casacore::Int > * itsLineWidth
Definition: DSBasic.h:99
int Int
Definition: aipstype.h:50
virtual void rotateAbout(const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY)
Base class defining interface to pixel-based output devices.
Definition: PixelCanvas.h:161
virtual casacore::Bool setOptions(const casacore::Record &settings)
virtual void move(const casacore::Float &dX, const casacore::Float &dY)
virtual void draw(PixelCanvas *pc)
Standard fns.
The abstract base class for all &quot;DisplayShapes&quot;.
Definition: DisplayShape.h:77
virtual casacore::Record getOptions()
Settings.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual casacore::Int getLineWidth()
float Float
Definition: aipstype.h:54
virtual ~DSBasic()
Destructor.
virtual void setLineWidth(const casacore::Int pixels)
Manage line width.
DSBasic()
Default constructor.
Base class for all &quot;basic&quot; shapes.
Definition: DSBasic.h:68