1 // File: Graphic3d_Group_10.cxx (Text)
2 // Created: Fevrier 1992
4 // Copyright: OPEN CASCADE 1992
8 //-Design Declaration des variables specifiques aux groupes
11 //-Warning Un groupe est defini dans une structure
12 // Il s'agit de la plus petite entite editable
21 #include <Graphic3d_Group.jxx>
22 #include <Graphic3d_Group.pxx>
24 #include <TCollection_AsciiString.hxx>
28 void Graphic3d_Group::Text (
29 const Standard_CString AText,
30 const Graphic3d_Vertex& APoint,
31 const Standard_Real AHeight,
32 const Quantity_PlaneAngle AAngle,
33 const Graphic3d_TextPath ATp,
34 const Graphic3d_HorizontalTextAlignment AHta,
35 const Graphic3d_VerticalTextAlignment AVta,
36 const Standard_Boolean EvalMinMax
39 if (IsDeleted ()) return;
41 MyIsEmpty = Standard_False;
45 Standard_Real X, Y, Z;
46 APoint.Coord (X, Y, Z);
47 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
48 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
49 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
50 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
51 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
52 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
55 MyGraphicDriver->Text(MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
60 void Graphic3d_Group::Text (
61 const Standard_CString AText,
62 const Graphic3d_Vertex& APoint,
63 const Standard_Real AHeight,
64 const Standard_Boolean EvalMinMax
67 if (IsDeleted ()) return;
69 MyIsEmpty = Standard_False;
73 Standard_Real X, Y, Z;
74 APoint.Coord (X, Y, Z);
75 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
76 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
77 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
78 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
79 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
80 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
83 MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);
88 void Graphic3d_Group::Text (
89 const TCollection_ExtendedString& AText,
90 const Graphic3d_Vertex& APoint,
91 const Standard_Real AHeight,
92 const Quantity_PlaneAngle AAngle,
93 const Graphic3d_TextPath ATp,
94 const Graphic3d_HorizontalTextAlignment AHta,
95 const Graphic3d_VerticalTextAlignment AVta,
96 const Standard_Boolean EvalMinMax
99 if (IsDeleted ()) return;
101 MyIsEmpty = Standard_False;
105 Standard_Real X, Y, Z;
106 APoint.Coord (X, Y, Z);
107 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
108 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
109 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
110 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
111 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
112 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
115 MyGraphicDriver->Text(MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
120 void Graphic3d_Group::Text (
121 const TCollection_ExtendedString& AText,
122 const Graphic3d_Vertex& APoint,
123 const Standard_Real AHeight,
124 const Standard_Boolean EvalMinMax
127 if (IsDeleted ()) return;
129 MyIsEmpty = Standard_False;
133 Standard_Real X, Y, Z;
134 APoint.Coord (X, Y, Z);
135 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
136 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
137 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
138 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
139 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
140 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
143 MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);