0023024: Update headers of OCCT files
[occt.git] / src / IGESDimen / IGESDimen_ToolNewGeneralNote.cxx
CommitLineData
b311480e 1// Created by: CKY / Contract Toubro-Larsen
2// Copyright (c) 1993-1999 Matra Datavision
3// Copyright (c) 1999-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
7fd59977 9//
b311480e 10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
7fd59977 12//
b311480e 13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
20//--------------------------------------------------------------------
7fd59977 21//--------------------------------------------------------------------
22
23#include <IGESDimen_ToolNewGeneralNote.ixx>
24#include <IGESData_ParamCursor.hxx>
25#include <gp_XYZ.hxx>
26#include <IGESData_IGESEntity.hxx>
27#include <TCollection_HAsciiString.hxx>
28#include <TColgp_HArray1OfXYZ.hxx>
29#include <IGESData_HArray1OfIGESEntity.hxx>
30#include <Interface_HArray1OfHAsciiString.hxx>
31#include <TColStd_HArray1OfInteger.hxx>
32#include <TColStd_HArray1OfReal.hxx>
33#include <IGESData_Dump.hxx>
34#include <Interface_Macros.hxx>
35#include <stdio.h>
36
37
38IGESDimen_ToolNewGeneralNote::IGESDimen_ToolNewGeneralNote () { }
39
40
41void IGESDimen_ToolNewGeneralNote::ReadOwnParams
42 (const Handle(IGESDimen_NewGeneralNote)& ent,
43 const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const
44{
45 //Standard_Boolean st; //szv#4:S4163:12Mar99 moved down
46
47 Standard_Integer nbval;
48 Standard_Real width;
49 Standard_Real height;
50 Standard_Integer justifyCode;
51 gp_XYZ areaLoc;
52 Standard_Real areaRotationAngle;
53 gp_XYZ baseLinePos;
54 Standard_Real normalInterlineSpace;
55 Handle(TColStd_HArray1OfInteger) charDisplays;
56 Handle(TColStd_HArray1OfReal) charWidths;
57 Handle(TColStd_HArray1OfReal) charHeights;
58 Handle(TColStd_HArray1OfReal) interCharSpaces;
59 Handle(TColStd_HArray1OfReal) interlineSpaces;
60 Handle(TColStd_HArray1OfInteger) fontStyles;
61 Handle(TColStd_HArray1OfReal) charAngles;
62 Handle(Interface_HArray1OfHAsciiString) controlCodeStrings;
63 Handle(TColStd_HArray1OfInteger) nbChars;
64 Handle(TColStd_HArray1OfReal) boxWidths;
65 Handle(TColStd_HArray1OfReal) boxHeights;
66 Handle(TColStd_HArray1OfInteger) charSetCodes;
67 Handle(IGESData_HArray1OfIGESEntity) charSetEntities;
68 Handle(TColStd_HArray1OfReal) slantAngles;
69 Handle(TColStd_HArray1OfReal) rotationAngles;
70 Handle(TColStd_HArray1OfInteger) mirrorFlags;
71 Handle(TColStd_HArray1OfInteger) rotateFlags;
72 Handle(TColgp_HArray1OfXYZ) startPoints;
73 Handle(Interface_HArray1OfHAsciiString) texts;
74
75 //szv#4:S4163:12Mar99 `st=` not needed
76 PR.ReadReal(PR.Current(), "Text Width", width);
77 PR.ReadReal(PR.Current(), "Text Height", height);
78 PR.ReadInteger(PR.Current(), "Justification Code", justifyCode);
79 PR.ReadXYZ(PR.CurrentList(1, 3), "Area Location Point", areaLoc);
80 PR.ReadReal(PR.Current(), "Area Rotation Angle", areaRotationAngle);
81 PR.ReadXYZ(PR.CurrentList(1, 3), "Base Line Position", baseLinePos);
82 PR.ReadReal(PR.Current(),"NormalInterline Spacing",normalInterlineSpace);
83
84 Standard_Boolean st = PR.ReadInteger(PR.Current(), "Number of Text Strings", nbval);
85 if (st && nbval > 0)
86 {
87 charDisplays = new TColStd_HArray1OfInteger(1, nbval);
88 charWidths = new TColStd_HArray1OfReal(1, nbval);
89 charHeights = new TColStd_HArray1OfReal(1, nbval);
90 interCharSpaces = new TColStd_HArray1OfReal(1, nbval);
91 interlineSpaces = new TColStd_HArray1OfReal(1, nbval);
92 fontStyles = new TColStd_HArray1OfInteger(1, nbval);
93 charAngles = new TColStd_HArray1OfReal(1, nbval);
94 controlCodeStrings = new Interface_HArray1OfHAsciiString(1, nbval);
95 nbChars = new TColStd_HArray1OfInteger(1, nbval);
96 boxWidths = new TColStd_HArray1OfReal(1, nbval);
97 boxHeights = new TColStd_HArray1OfReal(1, nbval);
98 charSetCodes = new TColStd_HArray1OfInteger(1, nbval);
99 charSetEntities = new IGESData_HArray1OfIGESEntity(1,nbval);
100 slantAngles = new TColStd_HArray1OfReal(1, nbval);
101 rotationAngles = new TColStd_HArray1OfReal(1, nbval);
102 mirrorFlags = new TColStd_HArray1OfInteger(1, nbval);
103 rotateFlags = new TColStd_HArray1OfInteger(1, nbval);
104 startPoints = new TColgp_HArray1OfXYZ(1, nbval);
105 texts = new Interface_HArray1OfHAsciiString(1, nbval);
106 }
107 else PR.AddFail("Number of Text Strings: Not Positive");
108
109 if (! charDisplays.IsNull())
110 for (Standard_Integer i = 1; i <= nbval; i++)
111 {
112 Standard_Integer charDisplay;
113 Standard_Real charWidth;
114 Standard_Real charHeight;
115 Standard_Real interCharSpace;
116 Standard_Real interlineSpace;
117 Standard_Integer fontStyle;
118 Standard_Real charAngle;
119 Handle(TCollection_HAsciiString) controlCodeString;
120 Standard_Integer nbChar;
121 Standard_Real boxWidth;
122 Standard_Real boxHeight;
123 Standard_Integer charSetCode;
124 Handle(IGESData_IGESEntity) charSetEntity;
125 Standard_Real slantAngle;
126 Standard_Real rotationAngle;
127 Standard_Integer mirrorFlag;
128 Standard_Integer rotateFlag;
129 gp_XYZ startPoint;
130 Handle(TCollection_HAsciiString) text;
131
132 //st = PR.ReadInteger(PR.Current(), "Character Display",charDisplay); //szv#4:S4163:12Mar99 moved in if
133 if (PR.ReadInteger(PR.Current(), "Character Display",charDisplay))
134 charDisplays->SetValue(i, charDisplay);
135
136 //st = PR.ReadReal(PR.Current(), "Character Width", charWidth); //szv#4:S4163:12Mar99 moved in if
137 if (PR.ReadReal(PR.Current(), "Character Width", charWidth))
138 charWidths->SetValue(i, charWidth);
139
140 //st = PR.ReadReal(PR.Current(), "Character Height", charHeight); //szv#4:S4163:12Mar99 moved in if
141 if (PR.ReadReal(PR.Current(), "Character Height", charHeight))
142 charHeights->SetValue(i, charHeight);
143
144 //st = PR.ReadReal(PR.Current(), "Inter-character space", interCharSpace); //szv#4:S4163:12Mar99 moved in if
145 if (PR.ReadReal(PR.Current(), "Inter-character space", interCharSpace))
146 interCharSpaces->SetValue(i, interCharSpace);
147
148 //st = PR.ReadReal(PR.Current(), "Interline space", interlineSpace); //szv#4:S4163:12Mar99 moved in if
149 if (PR.ReadReal(PR.Current(), "Interline space", interlineSpace))
150 interlineSpaces->SetValue(i, interlineSpace);
151
152 //st = PR.ReadInteger(PR.Current(), "Font Style", fontStyle); //szv#4:S4163:12Mar99 moved in if
153 if (PR.ReadInteger(PR.Current(), "Font Style", fontStyle))
154 fontStyles->SetValue(i, fontStyle);
155
156 //st = PR.ReadReal(PR.Current(), "Character Angle", charAngle); //szv#4:S4163:12Mar99 moved in if
157 if (PR.ReadReal(PR.Current(), "Character Angle", charAngle))
158 charAngles->SetValue(i, charAngle);
159
160 //st = PR.ReadText(PR.Current(),"Control Code String", controlCodeString); //szv#4:S4163:12Mar99 moved in if
161 if (PR.ReadText(PR.Current(),"Control Code String", controlCodeString))
162 controlCodeStrings->SetValue(i, controlCodeString);
163
164 //st = PR.ReadInteger(PR.Current(), "Number of Characters", nbChar); //szv#4:S4163:12Mar99 moved in if
165 if (PR.ReadInteger(PR.Current(), "Number of Characters", nbChar))
166 nbChars->SetValue(i, nbChar);
167
168 //st = PR.ReadReal(PR.Current(), "Box Width", boxWidth); //szv#4:S4163:12Mar99 moved in if
169 if (PR.ReadReal(PR.Current(), "Box Width", boxWidth))
170 boxWidths->SetValue(i, boxWidth);
171
172 //st = PR.ReadReal(PR.Current(), "Box Height", boxHeight); //szv#4:S4163:12Mar99 moved in if
173 if (PR.ReadReal(PR.Current(), "Box Height", boxHeight))
174 boxHeights->SetValue(i, boxHeight);
175
176 Standard_Integer curnum = PR.CurrentNumber();
177 if (PR.DefinedElseSkip())
178 {
179 // Reading fontCode(Integer, must be positive)
180 PR.ReadInteger(PR.Current(), "Character Set Interpretation Code",charSetCode); //szv#4:S4163:12Mar99 `st=` not needed
181 // Reading charSetEnt
182 if (charSetCode < 0) {
183 charSetEntity = PR.ParamEntity (IR,curnum);
184 if (charSetEntity.IsNull())
185 PR.AddFail("Char Set Interpretation Entity : incorrect reference");
186 charSetEntities->SetValue(i, charSetEntity);
187 charSetCodes->SetValue(i, -1);
188 } else {
189 charSetCodes->SetValue(i, charSetCode);
190 }
191 }
192
193 else
194 charSetCodes->SetValue(i, 1);
195
196 if (PR.DefinedElseSkip())
197 {
198 //st = PR.ReadReal(PR.Current(), "Slant Angle", slantAngle); //szv#4:S4163:12Mar99 moved in if
199 if (PR.ReadReal(PR.Current(), "Slant Angle", slantAngle))
200 slantAngles->SetValue(i, slantAngle);
201 }
202 else
c6541a0c 203 slantAngles->SetValue(i, M_PI/2);
7fd59977 204
205 //st = PR.ReadReal(PR.Current(), "Rotation Angle", rotationAngle); //szv#4:S4163:12Mar99 moved in if
206 if (PR.ReadReal(PR.Current(), "Rotation Angle", rotationAngle))
207 rotationAngles->SetValue(i, rotationAngle);
208
209 //st = PR.ReadInteger(PR.Current(), "Mirror Flag", mirrorFlag); //szv#4:S4163:12Mar99 moved in if
210 if (PR.ReadInteger(PR.Current(), "Mirror Flag", mirrorFlag))
211 mirrorFlags->SetValue(i, mirrorFlag);
212
213 //st = PR.ReadInteger(PR.Current(), "Rotate Flag", rotateFlag); //szv#4:S4163:12Mar99 moved in if
214 if (PR.ReadInteger(PR.Current(), "Rotate Flag", rotateFlag))
215 rotateFlags->SetValue(i, rotateFlag);
216
217 //st = PR.ReadXYZ(PR.CurrentList(1, 3), "Start Point", startPoint); //szv#4:S4163:12Mar99 moved in if
218 if (PR.ReadXYZ(PR.CurrentList(1, 3), "Start Point", startPoint))
219 startPoints->SetValue(i, startPoint);
220
221 //st = PR.ReadText(PR.Current(), "Text String", text); //szv#4:S4163:12Mar99 moved in if
222 if (PR.ReadText(PR.Current(), "Text String", text))
223 texts->SetValue(i, text);
224 }
225
226 DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
227 ent->Init
228 ( width, height, justifyCode, areaLoc, areaRotationAngle,baseLinePos,
229 normalInterlineSpace, charDisplays, charWidths, charHeights,
230 interCharSpaces, interlineSpaces, fontStyles, charAngles,
231 controlCodeStrings, nbChars, boxWidths, boxHeights, charSetCodes,
232 charSetEntities, slantAngles, rotationAngles, mirrorFlags, rotateFlags,
233 startPoints, texts);
234}
235
236void IGESDimen_ToolNewGeneralNote::WriteOwnParams
237 (const Handle(IGESDimen_NewGeneralNote)& ent, IGESData_IGESWriter& IW) const
238{
239 IW.Send(ent->TextWidth());
240 IW.Send(ent->TextHeight());
241 IW.Send(ent->JustifyCode());
242 IW.Send(ent->AreaLocation().X());
243 IW.Send(ent->AreaLocation().Y());
244 IW.Send(ent->AreaLocation().Z());
245 IW.Send(ent->AreaRotationAngle());
246 IW.Send(ent->BaseLinePosition().X());
247 IW.Send(ent->BaseLinePosition().Y());
248 IW.Send(ent->BaseLinePosition().Z());
249 IW.Send(ent->NormalInterlineSpace());
250 Standard_Integer nbval = ent->NbStrings();
251 IW.Send(nbval);
252
253 for (Standard_Integer i = 1; i <= nbval; i++)
254 {
255 IW.Send(ent->CharacterDisplay(i));
256 IW.Send(ent->CharacterWidth(i));
257 IW.Send(ent->CharacterHeight(i));
258 IW.Send(ent->InterCharacterSpace(i));
259 IW.Send(ent->InterlineSpace(i));
260 IW.Send(ent->FontStyle(i));
261 IW.Send(ent->CharacterAngle(i));
262 IW.Send(ent->ControlCodeString(i));
263 IW.Send(ent->NbCharacters(i));
264 IW.Send(ent->BoxWidth(i));
265 IW.Send(ent->BoxHeight(i));
266 if (ent->IsCharSetEntity(i))
267 IW.Send(ent->CharSetEntity(i),Standard_True); // negative
268 else
269 IW.Send(ent->CharSetCode(i));
270 IW.Send(ent->SlantAngle(i));
271 IW.Send(ent->RotationAngle(i));
272 IW.Send(ent->MirrorFlag(i));
273 IW.Send(ent->RotateFlag(i));
274 IW.Send((ent->StartPoint(i)).X());
275 IW.Send((ent->StartPoint(i)).Y());
276 IW.Send((ent->StartPoint(i)).Z());
277 IW.Send(ent->Text(i));
278 }
279}
280
281void IGESDimen_ToolNewGeneralNote::OwnShared
282 (const Handle(IGESDimen_NewGeneralNote)& ent, Interface_EntityIterator& iter) const
283{
284 Standard_Integer nbval = ent->NbStrings();
285 for (Standard_Integer i = 1; i <= nbval; i++)
286 {
287
288 if (ent->IsCharSetEntity(i))
289 iter.GetOneItem(ent->CharSetEntity(i));
290 }
291}
292
293void IGESDimen_ToolNewGeneralNote::OwnCopy
294 (const Handle(IGESDimen_NewGeneralNote)& another,
295 const Handle(IGESDimen_NewGeneralNote)& ent, Interface_CopyTool& TC) const
296{
297 Standard_Real width = another->TextWidth();
298 Standard_Real height = another->TextHeight();
299 Standard_Integer justifyCode = another->JustifyCode();
300 gp_XYZ areaLoc = (another->AreaLocation()).XYZ();
301 Standard_Real areaRotationAngle = another->AreaRotationAngle();
302 gp_XYZ baseLinePos = (another->BaseLinePosition()).XYZ();
303 Standard_Real normalInterlineSpace = another->NormalInterlineSpace();
304 Standard_Integer nbval = another->NbStrings();
305
306 Handle(TColStd_HArray1OfInteger) charDisplays;
307 Handle(TColStd_HArray1OfReal) charWidths;
308 Handle(TColStd_HArray1OfReal) charHeights;
309 Handle(TColStd_HArray1OfReal) interCharSpaces;
310 Handle(TColStd_HArray1OfReal) interlineSpaces;
311 Handle(TColStd_HArray1OfInteger) fontStyles;
312 Handle(TColStd_HArray1OfReal) charAngles;
313 Handle(Interface_HArray1OfHAsciiString) controlCodeStrings;
314 Handle(TColStd_HArray1OfInteger) nbChars;
315 Handle(TColStd_HArray1OfReal) boxWidths;
316 Handle(TColStd_HArray1OfReal) boxHeights;
317 Handle(TColStd_HArray1OfInteger) charSetCodes;
318 Handle(IGESData_HArray1OfIGESEntity) charSetEntities;
319 Handle(TColStd_HArray1OfReal) slantAngles;
320 Handle(TColStd_HArray1OfReal) rotationAngles;
321 Handle(TColStd_HArray1OfInteger) mirrorFlags;
322 Handle(TColStd_HArray1OfInteger) rotateFlags;
323 Handle(TColgp_HArray1OfXYZ) startPoints;
324 Handle(Interface_HArray1OfHAsciiString) texts;
325
326 charDisplays = new TColStd_HArray1OfInteger(1, nbval);
327 charWidths = new TColStd_HArray1OfReal (1, nbval);
328 charHeights = new TColStd_HArray1OfReal (1, nbval);
329 interCharSpaces = new TColStd_HArray1OfReal (1, nbval);
330 interlineSpaces = new TColStd_HArray1OfReal (1, nbval);
331 fontStyles = new TColStd_HArray1OfInteger(1, nbval);
332 charAngles = new TColStd_HArray1OfReal (1, nbval);
333 controlCodeStrings = new Interface_HArray1OfHAsciiString(1, nbval);
334 nbChars = new TColStd_HArray1OfInteger(1, nbval);
335 boxWidths = new TColStd_HArray1OfReal (1, nbval);
336 boxHeights = new TColStd_HArray1OfReal (1, nbval);
337 charSetCodes = new TColStd_HArray1OfInteger(1, nbval);
338 charSetEntities = new IGESData_HArray1OfIGESEntity(1, nbval);
339 slantAngles = new TColStd_HArray1OfReal (1, nbval);
340 rotationAngles = new TColStd_HArray1OfReal (1, nbval);
341 mirrorFlags = new TColStd_HArray1OfInteger(1, nbval);
342 rotateFlags = new TColStd_HArray1OfInteger(1, nbval);
343 startPoints = new TColgp_HArray1OfXYZ (1, nbval);
344 texts = new Interface_HArray1OfHAsciiString(1, nbval);
345
346 for (Standard_Integer i = 1; i <= nbval; i++)
347 {
348 charDisplays->SetValue (i, another->CharacterDisplay(i));
349 charWidths->SetValue (i, another->CharacterWidth(i));
350 charHeights->SetValue (i, another->CharacterHeight(i));
351 interCharSpaces->SetValue (i, another->InterCharacterSpace(i));
352 interlineSpaces->SetValue (i, another->InterlineSpace(i));
353 fontStyles->SetValue (i, another->FontStyle(i));
354 charAngles->SetValue (i, another->CharacterAngle(i));
355 controlCodeStrings->SetValue
356 (i, new TCollection_HAsciiString(another->ControlCodeString(i)));
357 nbChars->SetValue (i, another->NbCharacters(i));
358 boxWidths->SetValue (i, another->BoxWidth(i));
359 boxHeights->SetValue (i, another->BoxHeight(i));
360
361 if (another->IsCharSetEntity(i)) {
362 DeclareAndCast(IGESData_IGESEntity, charSetEntity,
363 TC.Transferred(another->CharSetEntity(i)));
364 charSetEntities->SetValue(i, charSetEntity);
365 }
366 else charSetCodes->SetValue(i, another->CharSetCode(i));
367
368 slantAngles->SetValue (i, another->SlantAngle(i));
369 rotationAngles->SetValue (i, another->RotationAngle(i));
370 mirrorFlags->SetValue (i, another->MirrorFlag(i));
371 rotateFlags->SetValue (i, another->RotateFlag(i));
372 startPoints->SetValue (i, another->StartPoint(i).XYZ());
373 texts->SetValue
374 (i, new TCollection_HAsciiString(another->Text(i)));
375 }
376
377 ent->Init (width, height, justifyCode, areaLoc, areaRotationAngle, baseLinePos,
378 normalInterlineSpace, charDisplays, charWidths, charHeights,
379 interCharSpaces, interlineSpaces, fontStyles, charAngles,
380 controlCodeStrings,nbChars, boxWidths, boxHeights, charSetCodes,
381 charSetEntities, slantAngles, rotationAngles, mirrorFlags,
382 rotateFlags, startPoints, texts);
383
384}
385
386IGESData_DirChecker IGESDimen_ToolNewGeneralNote::DirChecker
387 (const Handle(IGESDimen_NewGeneralNote)& /* ent */ ) const
388{
389 IGESData_DirChecker DC (213, 0);
390 DC.Structure(IGESData_DefVoid);
391 DC.LineFont(IGESData_DefValue);
392 DC.LineWeight(IGESData_DefValue);
393 DC.Color(IGESData_DefAny);
394 DC.UseFlagRequired(1);
395 DC.HierarchyStatusIgnored();
396 return DC;
397}
398
399void IGESDimen_ToolNewGeneralNote::OwnCheck
400 (const Handle(IGESDimen_NewGeneralNote)& ent,
401 const Interface_ShareTool& , Handle(Interface_Check)& ach) const
402{
403
404 Standard_Integer jcode = ent->JustifyCode();
405 if ((jcode < 0) || (jcode > 3))
406 ach->AddFail("Justify Code != 0, 1, 2, 3");
407 Standard_Integer upper = ent->NbStrings();
408 for (Standard_Integer i = 1; i <= upper; i ++)
409 {
410 if (ent->NbCharacters(i) != ent->Text(i)->Length())
411 {
412 char mess[80];
413 sprintf(mess,"%d : Number of Characters != Length of Text String",i);
414 ach->AddFail(mess);
415 }
416
417 Standard_Integer charcode = ent->CharSetCode(i);
418 if ( (charcode >= 0) && (charcode != 1) &&
419 ((charcode < 1001) || (charcode > 1003)))
420 {
421 char mess[80];
422 sprintf(mess, "%d : Character Set Code != 1, 1001, 1002, 1003",i);
423 ach->AddFail(mess);
424 }
425
426 Standard_Integer chardisp = ent->CharacterDisplay(i);
427 if ((chardisp < 0) || (chardisp > 1))
428 {
429 char mess[80];
430 sprintf(mess, "%d : Character Display != 0, 1",i);
431 ach->AddFail(mess);
432 }
433
434 Standard_Integer mflag = ent->MirrorFlag(i);
435 if ((mflag < 0) || (mflag > 2))
436 {
437 char mess[80];
438 sprintf(mess, "%d : Mirror flag != 0, 1, 2",i);
439 ach->AddFail(mess);
440 }
441
442 Standard_Integer rflag = ent->RotateFlag(i);
443 if ((rflag < 0) || (rflag > 1))
444 {
445 char mess[80];
446 sprintf(mess, "%d : Rotate flag != 0, 1",i);
447 ach->AddFail(mess);
448 }
449 }
450}
451
452void IGESDimen_ToolNewGeneralNote::OwnDump
453 (const Handle(IGESDimen_NewGeneralNote)& ent, const IGESData_IGESDumper& dumper,
454 const Handle(Message_Messenger)& S, const Standard_Integer level) const
455{
456 Standard_Integer sublevel = (level > 4) ? 1 : 0;
457 Standard_Integer nbval = ent->NbStrings();
458
459 S << "IGESDimen_NewGeneralNote" << endl;
460 S << "Text Area : Width : " << ent->TextWidth() << " ";
461 S << "Height : " << ent->TextHeight() << " ";
462 S << "Justification Code : " << ent->JustifyCode() << endl;
463 S << "Text Area Location Point : ";
464 IGESData_DumpXYZL(S,level, ent->AreaLocation(), ent->Location());
465 S << "Rotation Angle of Text : " << ent->AreaRotationAngle() << endl;
466 S << "Base Line Position : ";
467 IGESData_DumpXYZL(S,level, ent->BaseLinePosition(), ent->Location());
468 S << "Normal Interline Spacing : " << ent->NormalInterlineSpace() << endl;
469 S << "Number of Text Strings : " << nbval << endl;
470
471 S << "Character Display : " << endl;
472 S << "Character Width : " << endl;
473 S << "Character Height : " << endl;
474 S << "Inter Character Spacing : " << endl;
475 S << "Interline Spacing : " << endl;
476 S << "Font Styles : " << endl;
477 S << "Character Angle : " << endl;
478 S << "Control Code String : " << endl;
479 S << "Number of Characters : " << endl;
480 S << "Box Widths : " << endl;
481 S << "Box Heights : " << endl;
482 S << "Character Set Codes : " << endl;
483 S << "Character Set Entities : " << endl;
484 S << "Slant Angles : " << endl;
485 S << "Rotation Angles : " << endl;
486 S << "Mirror Flags : " << endl;
487 S << "Rotate Flags : " << endl;
488 S << "Start Points : " << endl;
489 S << "Texts : ";
490 IGESData_DumpVals(S,-level,1, nbval, ent->NbCharacters);
491 S << endl;
492 if (level > 4)
493 {
494 S << "Details of each String" << endl;
495 for ( Standard_Integer i = 1; i <= nbval; i++)
496 {
497 S << "[" << i << "]: " << endl;
498 S << "Character Display : " << ent->CharacterDisplay(i) << " ";
499 S << "Character Width : " << ent->CharacterWidth(i) << " ";
500 S << "Character Height : " << ent->CharacterHeight(i) << endl;
501 S << "Inter Character Spacing : "<<ent->InterCharacterSpace(i)<<" ";
502 S << "Interline Spacing : " << ent->InterlineSpace(i) << endl;
503 S << "Font Styles : " << ent->FontStyle(i) << endl;
504 S << "Character Angle : " << ent->CharacterAngle(i) << endl;
505 S << "Control Code String : " ;
506 IGESData_DumpString(S,ent->ControlCodeString(i));
507 S << endl;
508 S << "Number of Characters : " << ent->NbCharacters(i) << " ";
509 S << "Box Width : " << ent->BoxWidth(i) << " ";
510 S << "Box Height : " << ent->BoxHeight(i) << endl;
511 if (ent->IsCharSetEntity(i))
512 {
513 S << "Character Set Entity : ";
514 dumper.Dump (ent->CharSetEntity(i),S, sublevel);
515 S << endl;
516 }
517 else
518 S << "Character Set Code : " << ent->CharSetCode(i) << endl;
519
520 S << "Slant Angle : " << ent->SlantAngle(i) << " ";
521 S << "Rotation Angle : " << ent->RotationAngle(i) << " ";
522 S << "Mirror Flag : " << ent->MirrorFlag(i) << " ";
523 S << "Rotate Flag : " << ent->RotateFlag(i) << endl;
524 S << "Start Point : ";
525 IGESData_DumpXYZL(S,level, ent->StartPoint(i), ent->Location());
526 S << "Text : ";
527 IGESData_DumpString(S,ent->Text(i));
528 S << endl;
529 }
530 }
531 else S << endl;
532}