1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1995-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.
18 //-Design Declaration des variables specifiques aux groupes
21 //-Warning Un groupe est defini dans une structure
22 // Il s'agit de la plus petite entite editable
31 #include <Graphic3d_Group.jxx>
32 #include <Graphic3d_Group.pxx>
34 #include <TCollection_AsciiString.hxx>
38 void Graphic3d_Group::Text (
39 const Standard_CString AText,
40 const Graphic3d_Vertex& APoint,
41 const Standard_Real AHeight,
42 const Quantity_PlaneAngle AAngle,
43 const Graphic3d_TextPath ATp,
44 const Graphic3d_HorizontalTextAlignment AHta,
45 const Graphic3d_VerticalTextAlignment AVta,
46 const Standard_Boolean EvalMinMax
49 if (IsDeleted ()) return;
51 MyIsEmpty = Standard_False;
55 Standard_ShortReal X, Y, Z;
56 APoint.Coord (X, Y, Z);
57 if (X < MyBounds.XMin) MyBounds.XMin = X;
58 if (Y < MyBounds.YMin) MyBounds.YMin = Y;
59 if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
60 if (X > MyBounds.XMax) MyBounds.XMax = X;
61 if (Y > MyBounds.YMax) MyBounds.YMax = Y;
62 if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
65 MyGraphicDriver->Text(MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
70 void Graphic3d_Group::Text (
71 const Standard_CString AText,
72 const Graphic3d_Vertex& APoint,
73 const Standard_Real AHeight,
74 const Standard_Boolean EvalMinMax
77 if (IsDeleted ()) return;
79 MyIsEmpty = Standard_False;
83 Standard_ShortReal X, Y, Z;
84 APoint.Coord (X, Y, Z);
85 if (X < MyBounds.XMin) MyBounds.XMin = X;
86 if (Y < MyBounds.YMin) MyBounds.YMin = Y;
87 if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
88 if (X > MyBounds.XMax) MyBounds.XMax = X;
89 if (Y > MyBounds.YMax) MyBounds.YMax = Y;
90 if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
93 MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);
98 void Graphic3d_Group::Text (
99 const TCollection_ExtendedString& AText,
100 const Graphic3d_Vertex& APoint,
101 const Standard_Real AHeight,
102 const Quantity_PlaneAngle AAngle,
103 const Graphic3d_TextPath ATp,
104 const Graphic3d_HorizontalTextAlignment AHta,
105 const Graphic3d_VerticalTextAlignment AVta,
106 const Standard_Boolean EvalMinMax
109 if (IsDeleted ()) return;
111 MyIsEmpty = Standard_False;
115 Standard_ShortReal X, Y, Z;
116 APoint.Coord (X, Y, Z);
117 if (X < MyBounds.XMin) MyBounds.XMin = X;
118 if (Y < MyBounds.YMin) MyBounds.YMin = Y;
119 if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
120 if (X > MyBounds.XMax) MyBounds.XMax = X;
121 if (Y > MyBounds.YMax) MyBounds.YMax = Y;
122 if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
125 MyGraphicDriver->Text(MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
130 void Graphic3d_Group::Text (
131 const TCollection_ExtendedString& AText,
132 const Graphic3d_Vertex& APoint,
133 const Standard_Real AHeight,
134 const Standard_Boolean EvalMinMax
137 if (IsDeleted ()) return;
139 MyIsEmpty = Standard_False;
143 Standard_ShortReal X, Y, Z;
144 APoint.Coord (X, Y, Z);
145 if (X < MyBounds.XMin) MyBounds.XMin = X;
146 if (Y < MyBounds.YMin) MyBounds.YMin = Y;
147 if (Z < MyBounds.ZMin) MyBounds.ZMin = Z;
148 if (X > MyBounds.XMax) MyBounds.XMax = X;
149 if (Y > MyBounds.YMax) MyBounds.YMax = Y;
150 if (Z > MyBounds.ZMax) MyBounds.ZMax = Z;
153 MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);