0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IGESGraph / IGESGraph_TextDisplayTemplate.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-11
2// Created by: CKY / Contract Toubro-Larsen ( TCD )
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESGraph_TextDisplayTemplate_HeaderFile
18#define _IGESGraph_TextDisplayTemplate_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Real.hxx>
24#include <Standard_Integer.hxx>
25#include <gp_XYZ.hxx>
26#include <IGESData_IGESEntity.hxx>
27#include <Standard_Boolean.hxx>
28class IGESGraph_TextFontDef;
29class gp_XYZ;
30class gp_Pnt;
31
32
33class IGESGraph_TextDisplayTemplate;
34DEFINE_STANDARD_HANDLE(IGESGraph_TextDisplayTemplate, IGESData_IGESEntity)
35
36//! defines IGES TextDisplayTemplate Entity,
37//! Type <312>, form <0, 1> in package IGESGraph
38//!
39//! Used to set parameters for display of information
40//! which has been logically included in another entity
41//! as a parameter value
42class IGESGraph_TextDisplayTemplate : public IGESData_IGESEntity
43{
44
45public:
46
47
48 Standard_EXPORT IGESGraph_TextDisplayTemplate();
49
50 //! This method is used to set the fields of the class
51 //! TextDisplayTemplate
52 //! - aWidth : Character box width
53 //! - aHeight : Character box height
54 //! - afontCode : Font code
55 //! - aFontEntity : Text Font Definition Entity
56 //! - aSlantAngle : Slant angle
57 //! - aRotationAngle : Rotation angle
58 //! - aMirrorFlag : Mirror Flag
59 //! - aRotationFlag : Rotate internal text flag
60 //! - aCorner : Lower left corner coordinates(Form No. 0),
61 //! Increments from coordinates (Form No. 1)
62 Standard_EXPORT void Init (const Standard_Real aWidth, const Standard_Real aHeight, const Standard_Integer aFontCode, const Handle(IGESGraph_TextFontDef)& aFontEntity, const Standard_Real aSlantAngle, const Standard_Real aRotationAngle, const Standard_Integer aMirrorFlag, const Standard_Integer aRotationFlag, const gp_XYZ& aCorner);
63
64 //! Sets <me> to be Incremental (Form 1) if <mode> is True,
65 //! or Basolute (Form 0) else
66 Standard_EXPORT void SetIncremental (const Standard_Boolean mode);
67
68 //! returns True if entity is Incremental (Form 1).
69 //! False if entity is Absolute (Form 0).
70 Standard_EXPORT Standard_Boolean IsIncremental() const;
71
72 //! returns Character Box Width.
73 Standard_EXPORT Standard_Real BoxWidth() const;
74
75 //! returns Character Box Height.
76 Standard_EXPORT Standard_Real BoxHeight() const;
77
78 //! returns False if theFontEntity is Null, True otherwise.
79 Standard_EXPORT Standard_Boolean IsFontEntity() const;
80
81 //! returns the font code.
82 Standard_EXPORT Standard_Integer FontCode() const;
83
84 //! returns Text Font Definition Entity used to define the font.
85 Standard_EXPORT Handle(IGESGraph_TextFontDef) FontEntity() const;
86
87 //! returns slant angle of character in radians.
88 Standard_EXPORT Standard_Real SlantAngle() const;
89
90 //! returns Rotation angle of text block in radians.
91 Standard_EXPORT Standard_Real RotationAngle() const;
92
93 //! returns Mirror flag
94 //! Mirror flag : 0 = no mirroring.
95 //! 1 = mirror axis perpendicular to text base line.
96 //! 2 = mirror axis is text base line.
97 Standard_EXPORT Standard_Integer MirrorFlag() const;
98
99 //! returns Rotate internal text flag.
100 //! Rotate internal text flag : 0 = text horizontal.
101 //! 1 = text vertical.
102 Standard_EXPORT Standard_Integer RotateFlag() const;
103
104 //! If IsIncremental() returns False,
105 //! gets coordinates of lower left corner
106 //! of first character box.
107 //! If IsIncremental() returns True,
108 //! gets increments from X, Y, Z coordinates
109 //! found in parent entity.
110 Standard_EXPORT gp_Pnt StartingCorner() const;
111
112 //! If IsIncremental() returns False,
113 //! gets coordinates of lower left corner
114 //! of first character box.
115 //! If IsIncremental() returns True,
116 //! gets increments from X, Y, Z coordinates
117 //! found in parent entity.
118 Standard_EXPORT gp_Pnt TransformedStartingCorner() const;
119
120
121
122
92efcf78 123 DEFINE_STANDARD_RTTIEXT(IGESGraph_TextDisplayTemplate,IGESData_IGESEntity)
42cf5bc1 124
125protected:
126
127
128
129
130private:
131
132
133 Standard_Real theBoxWidth;
134 Standard_Real theBoxHeight;
135 Standard_Integer theFontCode;
136 Handle(IGESGraph_TextFontDef) theFontEntity;
137 Standard_Real theSlantAngle;
138 Standard_Real theRotationAngle;
139 Standard_Integer theMirrorFlag;
140 Standard_Integer theRotateFlag;
141 gp_XYZ theCorner;
142
143
144};
145
146
147
148
149
150
151
152#endif // _IGESGraph_TextDisplayTemplate_HeaderFile