Test for 0022778: Bug in BRepMesh
[occt.git] / src / CGM / CGM_Driver.cdl
1 -- Created on: 1996-09-13
2 -- Created by: DCB
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class Driver from CGM inherits PlotterDriver from PlotMgt
23   ---Purpose: This class defines a CGM (Computer Graphic Metafile) plotter Driver.
24   ---         All necessary information about methods (purpose, level, category, etc.)
25   ---         can be found in CDL files from the inheritance tree (PlotMgt_PlotterDriver,
26   ---         Aspect_Driver).
27
28 uses
29   Plotter                 from PlotMgt,
30   ExtendedString          from TCollection,
31   ColorMap                from Aspect,
32   TypeMap                 from Aspect,
33   WidthMap                from Aspect,
34   TypeOfText              from Aspect,
35   TypeOfColorSpace        from Aspect,
36   PlaneAngle              from Quantity,
37   Length                  from Quantity,
38   Factor                  from Quantity,
39   Ratio                   from Quantity,
40   Array1OfShortReal       from TShort
41
42
43 is
44   Create(aPlotter          : Plotter from PlotMgt;
45          aName             : CString from Standard;
46          aDX,aDY           : Length from Quantity;
47          aTypeOfColorSpace : TypeOfColorSpace from Aspect = Aspect_TOCS_RGB) 
48   returns mutable Driver from CGM;
49
50
51   Create(aName             : CString from Standard;
52          aDX,aDY           : Length from Quantity;
53          aTypeOfColorSpace : TypeOfColorSpace from Aspect = Aspect_TOCS_RGB) 
54   returns mutable Driver from CGM;
55
56
57   BeginFile(me: mutable;
58             aPlotter          : Plotter from PlotMgt;
59             aDX,aDY           : Length from Quantity;
60             aTypeOfColorSpace : TypeOfColorSpace from Aspect)
61   is private;
62   
63   Close(me: mutable)
64   is redefined protected;
65   ---C++: alias ~ 
66
67
68   BeginDraw (me: mutable)
69   is redefined;
70
71
72   EndDraw (me: mutable; dontFlush: Boolean = Standard_False)
73   is redefined;
74
75
76   ---------------------------------------------
77   -- Category: Methods to define the attributes
78   ---------------------------------------------
79   InitializeColorMap(me: mutable; aColorMap: ColorMap from Aspect) 
80   is redefined protected;
81
82
83   InitializeTypeMap(me: mutable; aTypeMap: TypeMap from Aspect)
84   is redefined protected;
85
86
87   InitializeWidthMap(me: mutable; aWidthMap: WidthMap from Aspect)
88   is virtual protected;
89
90
91   -----------------------------------------
92   -- Category: Methods to manage the images
93   -----------------------------------------
94   SizeOfImageFile (me; anImageFile: CString from Standard;
95                        aWidth,aHeight: out Integer from Standard)
96   returns Boolean from Standard is redefined;
97
98
99   --------------------------------
100   -- Actual set graphic attributes
101   --------------------------------
102   PlotLineAttrib (me: mutable;
103     ColorIndex: Integer from Standard;
104     TypeIndex: Integer from Standard;
105     WidthIndex: Integer from Standard)
106   is redefined protected;
107
108
109   PlotPolyAttrib (me: mutable;
110     ColorIndex: Integer from Standard;
111     TileIndex: Integer from Standard;
112     DrawEdge: Boolean from Standard)
113   is redefined protected;
114
115
116   -----------------------------------------------
117   -- Category: Private methods to draw primitives
118   -----------------------------------------------
119   PlotPoint (me : mutable; X, Y: ShortReal from Standard)
120   returns Boolean from Standard
121   is redefined protected;
122
123
124   PlotSegment (me : mutable;
125       X1, Y1: ShortReal from Standard;
126       X2, Y2: ShortReal from Standard)
127   returns Boolean from Standard
128   is redefined protected;
129
130
131   PlotPolyline (me : mutable;
132       xArray : Address from Standard;
133       yArray : Address from Standard;
134       nPts   : Address from Standard;
135       nParts : Integer from Standard)
136   returns Boolean from Standard
137   is redefined protected;
138
139
140   PlotPolygon (me : mutable;
141       xArray : Address from Standard;
142       yArray : Address from Standard;
143       nPts   : Address from Standard;
144       nParts : Integer from Standard)
145   returns Boolean from Standard
146   is redefined protected;
147
148
149   PlotArc (me : mutable; X,Y : ShortReal from Standard;
150       anXradius,anYradius : ShortReal from Standard;
151       sAngle: ShortReal from Standard;
152       oAngle: ShortReal from Standard)
153   returns Boolean from Standard
154   is redefined protected;
155
156
157   PlotPolyArc (me : mutable; X,Y : ShortReal from Standard;
158       anXradius,anYradius : ShortReal from Standard;
159       sAngle: ShortReal from Standard;
160       oAngle: ShortReal from Standard)
161   returns Boolean from Standard
162   is redefined protected;
163
164
165   PlotImage (me: mutable; 
166       aX, aY, aWidth:  ShortReal from Standard;
167       aHeight, aScale: ShortReal from Standard;
168       anImageFile:     CString   from Standard;
169       anArrayOfPixels: Address   from Standard;
170       aLineIndex:      Integer   from Standard = -1)
171   returns Boolean from Standard
172   is redefined protected;
173
174
175   InitializeDriver  (me:  mutable; aName: CString from Standard)
176   is  private;
177
178
179   WriteData (me: mutable; 
180     aCode:      Integer  from  Standard;
181     pLongData:  Address  from  Standard;
182     pFloatData: Address  from  Standard;
183     pCharData:  Address  from  Standard)
184   is private;
185
186
187 fields
188   myBKIndex:          Integer   from Standard;
189   myCurrentPage:      Integer   from Standard;
190   myFileIsOpened:     Boolean   from Standard;
191   myFillIndex:        Integer   from Standard; 
192   myEdgeColor:        Integer   from Standard;
193   myEdgeType:         Integer   from Standard;
194   myEdgeWidth:        Integer   from Standard; 
195   myInteriorStyle:    Integer   from Standard; 
196   myEdgeVisibility:   Integer   from Standard;
197
198 end Driver from CGM;