summaryrefslogtreecommitdiff
path: root/src/CGM/CGM_Driver.cdl
blob: a6ced88bfbf32b5122c184796c70cbcfdc03c217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
-- File:      CGM_Driver.cdl
-- Created:   Fri Sep 13 12:04:31 1996
-- Author:    DCB
-- Copyright: Matra Datavision 1998

class Driver from CGM inherits PlotterDriver from PlotMgt
  ---Purpose: This class defines a CGM (Computer Graphic Metafile) plotter Driver.
  ---         All necessary information about methods (purpose, level, category, etc.)
  ---         can be found in CDL files from the inheritance tree (PlotMgt_PlotterDriver,
  ---         Aspect_Driver).

uses
  Plotter                 from PlotMgt,
  ExtendedString          from TCollection,
  ColorMap                from Aspect,
  TypeMap                 from Aspect,
  WidthMap                from Aspect,
  TypeOfText              from Aspect,
  TypeOfColorSpace        from Aspect,
  PlaneAngle              from Quantity,
  Length                  from Quantity,
  Factor                  from Quantity,
  Ratio                   from Quantity,
  Array1OfShortReal       from TShort


is
  Create(aPlotter          : Plotter from PlotMgt;
         aName             : CString from Standard;
         aDX,aDY           : Length from Quantity;
         aTypeOfColorSpace : TypeOfColorSpace from Aspect = Aspect_TOCS_RGB) 
  returns mutable Driver from CGM;


  Create(aName             : CString from Standard;
         aDX,aDY           : Length from Quantity;
         aTypeOfColorSpace : TypeOfColorSpace from Aspect = Aspect_TOCS_RGB) 
  returns mutable Driver from CGM;


  BeginFile(me: mutable;
            aPlotter          : Plotter from PlotMgt;
            aDX,aDY           : Length from Quantity;
            aTypeOfColorSpace : TypeOfColorSpace from Aspect)
  is private;
  
  Close(me: mutable)
  is redefined protected;
  ---C++: alias ~ 


  BeginDraw (me: mutable)
  is redefined;


  EndDraw (me: mutable; dontFlush: Boolean = Standard_False)
  is redefined;


  ---------------------------------------------
  -- Category: Methods to define the attributes
  ---------------------------------------------
  InitializeColorMap(me: mutable; aColorMap: ColorMap from Aspect) 
  is redefined protected;


  InitializeTypeMap(me: mutable; aTypeMap: TypeMap from Aspect)
  is redefined protected;


  InitializeWidthMap(me: mutable; aWidthMap: WidthMap from Aspect)
  is virtual protected;


  -----------------------------------------
  -- Category: Methods to manage the images
  -----------------------------------------
  SizeOfImageFile (me; anImageFile: CString from Standard;
                       aWidth,aHeight: out Integer from Standard)
  returns Boolean from Standard is redefined;


  --------------------------------
  -- Actual set graphic attributes
  --------------------------------
  PlotLineAttrib (me: mutable;
    ColorIndex: Integer from Standard;
    TypeIndex: Integer from Standard;
    WidthIndex: Integer from Standard)
  is redefined protected;


  PlotPolyAttrib (me: mutable;
    ColorIndex: Integer from Standard;
    TileIndex: Integer from Standard;
    DrawEdge: Boolean from Standard)
  is redefined protected;


  -----------------------------------------------
  -- Category: Private methods to draw primitives
  -----------------------------------------------
  PlotPoint (me : mutable; X, Y: ShortReal from Standard)
  returns Boolean from Standard
  is redefined protected;


  PlotSegment (me : mutable;
      X1, Y1: ShortReal from Standard;
      X2, Y2: ShortReal from Standard)
  returns Boolean from Standard
  is redefined protected;


  PlotPolyline (me : mutable;
      xArray : Address from Standard;
      yArray : Address from Standard;
      nPts   : Address from Standard;
      nParts : Integer from Standard)
  returns Boolean from Standard
  is redefined protected;


  PlotPolygon (me : mutable;
      xArray : Address from Standard;
      yArray : Address from Standard;
      nPts   : Address from Standard;
      nParts : Integer from Standard)
  returns Boolean from Standard
  is redefined protected;


  PlotArc (me : mutable; X,Y : ShortReal from Standard;
      anXradius,anYradius : ShortReal from Standard;
      sAngle: ShortReal from Standard;
      oAngle: ShortReal from Standard)
  returns Boolean from Standard
  is redefined protected;


  PlotPolyArc (me : mutable; X,Y : ShortReal from Standard;
      anXradius,anYradius : ShortReal from Standard;
      sAngle: ShortReal from Standard;
      oAngle: ShortReal from Standard)
  returns Boolean from Standard
  is redefined protected;


  PlotImage (me: mutable; 
      aX, aY, aWidth:  ShortReal from Standard;
      aHeight, aScale: ShortReal from Standard;
      anImageFile:     CString   from Standard;
      anArrayOfPixels: Address   from Standard;
      aLineIndex:      Integer   from Standard = -1)
  returns Boolean from Standard
  is redefined protected;


  InitializeDriver  (me:  mutable; aName: CString from Standard)
  is  private;


  WriteData (me: mutable; 
    aCode:      Integer  from  Standard;
    pLongData:  Address  from  Standard;
    pFloatData: Address  from  Standard;
    pCharData:  Address  from  Standard)
  is private;


fields
  myBKIndex:          Integer   from Standard;
  myCurrentPage:      Integer   from Standard;
  myFileIsOpened:     Boolean   from Standard;
  myFillIndex:        Integer   from Standard; 
  myEdgeColor:        Integer   from Standard;
  myEdgeType:         Integer   from Standard;
  myEdgeWidth:        Integer   from Standard; 
  myInteriorStyle:    Integer   from Standard; 
  myEdgeVisibility:   Integer   from Standard;

end Driver from CGM;