1 // Created by: CKY / Contract Toubro-Larsen
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 //--------------------------------------------------------------------
17 //--------------------------------------------------------------------
19 #include <IGESGraph_TextDisplayTemplate.ixx>
20 #include <gp_GTrsf.hxx>
23 IGESGraph_TextDisplayTemplate::IGESGraph_TextDisplayTemplate () { }
26 void IGESGraph_TextDisplayTemplate::Init
27 (const Standard_Real aWidth,
28 const Standard_Real aHeight,
29 const Standard_Integer aFontCode,
30 const Handle(IGESGraph_TextFontDef)& aFontEntity,
31 const Standard_Real aSlantAngle,
32 const Standard_Real aRotationAngle,
33 const Standard_Integer aMirrorFlag,
34 const Standard_Integer aRotationFlag,
35 const gp_XYZ& aCorner)
38 theBoxHeight = aHeight;
39 theFontCode = aFontCode;
40 theFontEntity = aFontEntity;
41 theSlantAngle = aSlantAngle;
42 theRotationAngle = aRotationAngle;
43 theMirrorFlag = aMirrorFlag;
44 theRotateFlag = aRotationFlag;
46 InitTypeAndForm(312,FormNumber()); // FormNumber 0-1 : Incremental status
49 void IGESGraph_TextDisplayTemplate::SetIncremental (const Standard_Boolean F)
51 InitTypeAndForm(312, (F ? 1 : 0));
55 Standard_Real IGESGraph_TextDisplayTemplate::BoxWidth () const
60 Standard_Real IGESGraph_TextDisplayTemplate::BoxHeight () const
65 Standard_Boolean IGESGraph_TextDisplayTemplate::IsFontEntity () const
67 return (! theFontEntity.IsNull());
70 Standard_Integer IGESGraph_TextDisplayTemplate::FontCode () const
75 Handle(IGESGraph_TextFontDef) IGESGraph_TextDisplayTemplate::FontEntity () const
80 Standard_Real IGESGraph_TextDisplayTemplate::SlantAngle () const
85 Standard_Real IGESGraph_TextDisplayTemplate::RotationAngle () const
87 return theRotationAngle;
90 Standard_Integer IGESGraph_TextDisplayTemplate::MirrorFlag () const
95 Standard_Integer IGESGraph_TextDisplayTemplate::RotateFlag () const
100 Standard_Boolean IGESGraph_TextDisplayTemplate::IsIncremental () const
102 return ( FormNumber() == 1 );
105 gp_Pnt IGESGraph_TextDisplayTemplate::StartingCorner () const
107 return ( gp_Pnt(theCorner) );
110 gp_Pnt IGESGraph_TextDisplayTemplate::TransformedStartingCorner () const
112 gp_XYZ TempXYZ = theCorner;
113 if (HasTransf()) Location().Transforms(TempXYZ);
114 return ( gp_Pnt(TempXYZ) );