b311480e |
1 | -- Created by: Tanya COOL |
2 | -- Copyright (c) 2000-2012 OPEN CASCADE SAS |
3 | -- |
4 | -- The content of this file is subject to the Open CASCADE Technology Public |
5 | -- License Version 6.5 (the "License"). You may not use the content of this file |
6 | -- except in compliance with the License. Please obtain a copy of the License |
7 | -- at http://www.opencascade.org and read it completely before using this file. |
8 | -- |
9 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
10 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
11 | -- |
12 | -- The Original Code and all software distributed under the License is |
13 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
14 | -- Initial Developer hereby disclaims all such warranties, including without |
15 | -- limitation, any warranties of merchantability, fitness for a particular |
16 | -- purpose or non-infringement. Please see the License for the specific terms |
17 | -- and conditions governing the rights and limitations under the License. |
18 | |
7fd59977 |
19 | |
20 | deferred class Dimension from Prs2d inherits Line from Graphic2d |
21 | |
22 | ---Purpose: Groups all dimensions |
23 | |
24 | uses |
25 | |
26 | Drawer from Graphic2d, |
27 | GraphicObject from Graphic2d, |
28 | Pnt2d from gp, |
29 | ExtendedString from TCollection, |
30 | ArrowSide from Prs2d, |
31 | TypeOfArrow from Prs2d, |
32 | Array1OfShortReal from TShort, |
33 | HArray1OfPnt2d from TColgp |
34 | |
35 | raises |
36 | |
37 | CircleDefinitionError from Graphic2d |
38 | |
39 | is |
40 | Initialize( aGO : GraphicObject from Graphic2d; |
41 | aText : ExtendedString from TCollection; |
42 | aTxtScale : Real from Standard; |
43 | anArrAngle : Real from Standard; |
44 | anArrLength : Real from Standard; |
45 | anArrType : TypeOfArrow from Prs2d; |
46 | anArrow : ArrowSide from Prs2d; |
47 | IsRevArrow : Boolean from Standard ) |
48 | |
49 | returns mutable Dimension from Prs2d; |
50 | |
51 | ---Purpose: creates a dimension |
52 | |
53 | ----------------------------------------------------- |
54 | -- Category: Modification of the properties |
55 | ----------------------------------------------------- |
56 | |
57 | SetText( me: mutable; aText: ExtendedString from TCollection ); |
58 | ---C++: inline |
59 | ---Level: Public |
60 | ---Purpose: Sets the text to this dimension |
61 | |
62 | SetTextScale( me: mutable; aTS: Real from Standard ); |
63 | ---C++: inline |
64 | ---Level: Public |
65 | ---Purpose: Sets the scale of text to this dimension |
66 | |
67 | SetTextFont( me: mutable; aTF: Integer from Standard ); |
68 | ---C++: inline |
69 | ---Level: Public |
70 | ---Purpose: Sets the index of the font of this text to this dimension |
71 | |
72 | SetFontOfSymb( me: mutable; aFS: Integer from Standard ); |
73 | ---C++: inline |
74 | ---Level: Public |
75 | ---Purpose: Sets the index of the font of the symbol to this dimension |
76 | |
77 | SetArrowType( me: mutable; anArrT: TypeOfArrow from Prs2d ); |
78 | ---C++: inline |
79 | ---Level: Public |
80 | ---Purpose: Sets the type of arrows to this dimension |
81 | |
82 | SetArrowSides( me: mutable; anArrS: ArrowSide from Prs2d); |
83 | ---C++: inline |
84 | ---Level: Public |
85 | ---Purpose: Sets the number of arrows to this dimension |
86 | |
87 | DrawSymbol( me: mutable; isDraw: Boolean from Standard ); |
88 | ---C++: inline |
89 | ---Level: Public |
90 | ---Purpose: Sets the flag for drawing additional symbol |
91 | |
92 | SetSymbolCode( me: mutable; aCode: Integer from Standard ); |
93 | ---C++: inline |
94 | ---Level: Public |
95 | ---Purpose: Sets the ASCII code of the symbol |
96 | |
97 | CalcTxtPos(me:mutable; theFromAbs: |
98 | Boolean from Standard=Standard_False) is deferred protected; |
99 | |
100 | SetTextAbsPos(me:mutable; Xp,Yp: Real from Standard ) |
101 | ---C++: inline |
102 | ---Level: Public |
103 | ---Purpose: Sets the CalcTxtPos(Standard_True) |
104 | -- myAbsX=Xp |
105 | -- myAbsY=Yp |
106 | |
107 | is static; |
108 | |
109 | SetTextAbsAngle(me:mutable; Ap: Real from Standard) |
110 | ---C++: inline |
111 | ---Level: Public |
112 | ---Purpose: Sets the CalcTxtPos(Standard_True) |
113 | -- myAbsAngle=Ap |
114 | is static; |
115 | |
116 | SetTextRelPos(me:mutable; Xp,Yp: Real from Standard ) |
117 | ---C++: inline |
118 | ---Level: Public |
119 | ---Purpose: Sets the CalcTxtPos(Standard_False) |
120 | -- myAbsX=Xp |
121 | -- myAbsY=Yp |
122 | is static; |
123 | |
124 | SetTextRelAngle(me:mutable; Ap: Real from Standard ) |
125 | ---C++: inline |
126 | ---Level: Public |
127 | ---Purpose: Sets the CalcTxtPos(Standard_False) |
128 | -- myAbsAngle=Ap |
129 | is static; |
130 | |
131 | ----------------------------------------------------- |
132 | -- Category: Inquire methods |
133 | ----------------------------------------------------- |
134 | |
135 | Text( me ) returns ExtendedString from TCollection; |
136 | ---C++: inline |
137 | ---Level: Public |
138 | ---Purpose: Returns text of this dimension |
139 | |
140 | TextAbsX(me) returns Real from Standard; |
141 | ---C++: inline |
142 | ---Level: Public |
143 | ---Purpose: Returns X - coordinat of text in absolute axis |
144 | -- add by enk Wed Dec 11 10:34 2002 |
145 | |
146 | TextAbsY(me) returns Real from Standard; |
147 | ---C++: inline |
148 | ---Level: Public |
149 | ---Purpose: Returns Y - coordinat of text in absolute axis |
150 | -- add by enk Wed Dec 11 10:34 2002 |
151 | |
152 | TextAbsAngle(me) returns Real from Standard; |
153 | ---C++: inline |
154 | ---Level: Public |
155 | ---Purpose: Returns angle of text in absolute axis |
156 | -- add by enk Wed Dec 11 10:34 2002 |
157 | |
158 | TextRelH(me) returns Real from Standard; |
159 | ---C++: inline |
160 | ---Level: Public |
161 | ---Purpose: Returns the horizontal position of text |
162 | --Add by enk Mon Nov 25 09:43 |
163 | |
164 | TextRelV(me) returns Real from Standard; |
165 | ---C++: inline |
166 | ---Level: Public |
167 | ---Purpose: Returns the vertical position of text |
168 | --Add by enk Mon Nov 25 09:43 |
169 | |
170 | TextRelAngle(me) returns Real from Standard; |
171 | ---C++: inline |
172 | ---Level: Public |
173 | ---Purpose: Returns the angle of text |
174 | --Add by enk Mon Nov 25 09:43 |
175 | |
176 | TextScale( me ) returns Real from Standard ; |
177 | ---C++: inline |
178 | ---Level: Public |
179 | ---Purpose: Returns the scale of text of this dimension |
180 | |
181 | TextFont( me ) returns Integer from Standard; |
182 | ---C++: inline |
183 | ---Level: Public |
184 | ---Purpose: Returns the index of the font of this text of this dimension |
185 | |
186 | FontOfSymb( me ) returns Integer from Standard; |
187 | ---C++: inline |
188 | ---Level: Public |
189 | ---Purpose: Returns the index of the font of the symbol of this dimension |
190 | |
191 | ArrowType( me ) returns TypeOfArrow from Prs2d; |
192 | ---C++: inline |
193 | ---Level: Public |
194 | ---Purpose: Indicates the type of arrows of this dimension |
195 | |
196 | ArrowSides( me ) returns ArrowSide from Prs2d; |
197 | ---C++: inline |
198 | ---Level: Public |
199 | ---Purpose: Indicates the number of arrows of this dimension |
200 | |
201 | ArrowAngle( me ) returns Real from Standard; |
202 | ---C++: inline |
203 | ---Level: Public |
204 | ---Purpose: Indicates the angle of arrow of this dimension |
205 | |
206 | ArrowLength( me ) returns Real from Standard; |
207 | ---C++: inline |
208 | ---Level: Public |
209 | ---Purpose: Indicates the length of arrow of this dimension |
210 | |
211 | ArrowIsReversed( me ) returns Boolean from Standard; |
212 | ---C++: inline |
213 | ---Level: Public |
214 | ---Purpose: Return true if arrows are reversed, false - in otherwise |
215 | |
216 | IsDrawSymbol( me ) returns Boolean from Standard; |
217 | ---C++: inline |
218 | ---Level: Public |
219 | ---Purpose: Return true if symbol is drawn, false - in otherwise |
220 | |
221 | SymbolCode( me ) returns Integer from Standard; |
222 | ---C++: inline |
223 | ---Level: Public |
224 | ---Purpose: Return ASCII code of the symbol |
225 | |
226 | ArrayOfFirstArrowPnt( me ) returns HArray1OfPnt2d from TColgp; |
227 | ---Level: Public |
228 | ---C++: return const |
229 | |
230 | ArrayOfSecondArrowPnt( me ) returns HArray1OfPnt2d from TColgp; |
231 | ---Level: Public |
232 | ---C++: return const |
233 | |
234 | fields |
235 | |
236 | myText : ExtendedString from TCollection is protected; |
237 | myTextScale : Real from Standard is protected; |
238 | |
239 | myTextPosH : Real from Standard is protected;---------------------------------- |
240 | myTextPosV : Real from Standard is protected;--Add by enk Fri Nov 22 17:55 2002 |
241 | myTextAngle : Real from Standard is protected;---------------------------------- |
242 | myAbsX : Real from Standard is protected;---------------------------------- |
243 | myAbsY : Real from Standard is protected;--Add by enk Fri Dec 6 11:30 2002 |
244 | myAbsAngle : Real from Standard is protected;---------------------------------- |
245 | |
246 | |
247 | myTextFont : Integer from Standard is protected; |
248 | mySymbFont : Integer from Standard is protected; |
249 | myXVert1 : Array1OfShortReal from TShort is protected; |
250 | myYVert1 : Array1OfShortReal from TShort is protected; |
251 | myXVert2 : Array1OfShortReal from TShort is protected; |
252 | myYVert2 : Array1OfShortReal from TShort is protected; |
253 | myArrType : TypeOfArrow from Prs2d is protected; |
254 | myArrow : ArrowSide from Prs2d is protected; |
255 | myArrowAng : Real from Standard is protected; |
256 | myArrowLen : Real from Standard is protected; |
257 | myIsRevArr : Boolean from Standard is protected; |
258 | myIsSymbol : Boolean from Standard is protected; |
259 | mySymbCode : Integer from Standard is protected; |
260 | |
261 | end Dimension from Prs2d; |