casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PCVGBuffer.h
Go to the documentation of this file.
1 //# PCVGBuffer.h: buffering vector graphics for the PixelCanvases
2 //# Copyright (C) 1993,1994,1995,1996,1998,1999,2000
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#$Id$
27 
28 #ifndef TRIALDISPLAY_PCVGBUFFER_H
29 #define TRIALDISPLAY_PCVGBUFFER_H
30 
31 #include <casa/aips.h>
32 #include <casa/Arrays/Matrix.h>
33 
34 namespace casa { //# NAMESPACE CASA - BEGIN
35 
36  class PixelCanvas;
37 
38 // <summary>
39 //
40 // </summary>
41 //
42 // <use visibility=export>
43 //
44 // <reviewed>
45 // </reviewed>
46 //
47 // <prerequisite>
48 // <li> none
49 // </prerequisite>
50 //
51 // <etymology>
52 // The name of PCVGBuffer comes from ...
53 // </etymology>
54 //
55 // <synopsis>
56 // Display Class File
57 // </synopsis>
58 //
59 // <motivation>
60 // </motivation>
61 //
62 // <example>
63 // none available.
64 // </example>
65 //
66 // <todo>
67 // <li> write and test!
68 // </todo>
69 //
70 
71  class PCVGBuffer {
72 
73  public:
74 
75  enum AccumMode { AMNone,
80  };
81 
82  // Default Constructor Required
83  PCVGBuffer(PixelCanvas * pc, casacore::uInt nVerts = 1024);
84 
85  // User Constructor
86  PCVGBuffer();
87 
88  // add point
90 
91  // add line
93 
94  // add point to polyline
96 
97  // add point to polygon
99 
100  // flush the buffer
101  void flush();
102 
103  // current mode
104  AccumMode mode() const {
105  return mode_;
106  }
107 
108  // change modes
109  void setMode(AccumMode m);
110 
111  // check size and make more if needed
112  void checkSpace();
113 
114  // Destructor
115  virtual ~PCVGBuffer();
116 
117  private:
118 
120 
125 
126  };
127 
128 
129 } //# NAMESPACE CASA - END
130 
131 #endif
PixelCanvas * pc_
Definition: PCVGBuffer.h:119
casacore::Matrix< casacore::Float > verts_
Definition: PCVGBuffer.h:123
casacore::uInt blockSize_
Definition: PCVGBuffer.h:124
virtual ~PCVGBuffer()
Destructor.
Base class defining interface to pixel-based output devices.
Definition: PixelCanvas.h:161
AccumMode mode() const
current mode
Definition: PCVGBuffer.h:104
casacore::uInt c_
Definition: PCVGBuffer.h:122
float Float
Definition: aipstype.h:54
void setMode(AccumMode m)
change modes
void checkSpace()
check size and make more if needed
void accumPolylinePoint(casacore::Float x, casacore::Float y)
add point to polyline
void flush()
flush the buffer
PCVGBuffer()
User Constructor.
void accumPolygonPoint(casacore::Float x, casacore::Float y)
add point to polygon
AccumMode mode_
Definition: PCVGBuffer.h:121
void accumPoint(casacore::Float x, casacore::Float y)
add point
void accumLine(casacore::Float x1, casacore::Float y1, casacore::Float x2, casacore::Float y2)
add line
unsigned int uInt
Definition: aipstype.h:51