2 // File Graphic3d_Group_10.cxx (Text)
3 // Created Fevrier 1992
6 //-Copyright MatraDatavision 1991,1992
10 //-Design Declaration des variables specifiques aux groupes
13 //-Warning Un groupe est defini dans une structure
14 // Il s'agit de la plus petite entite editable
23 #include <Graphic3d_Group.jxx>
24 #include <Graphic3d_Group.pxx>
26 #include <TCollection_AsciiString.hxx>
30 void Graphic3d_Group::Text (
31 const Standard_CString AText,
32 const Graphic3d_Vertex& APoint,
33 const Standard_Real AHeight,
34 const Quantity_PlaneAngle AAngle,
35 const Graphic3d_TextPath ATp,
36 const Graphic3d_HorizontalTextAlignment AHta,
37 const Graphic3d_VerticalTextAlignment AVta,
38 const Standard_Boolean EvalMinMax
41 if (IsDeleted ()) return;
43 MyIsEmpty = Standard_False;
47 Standard_Real X, Y, Z;
48 APoint.Coord (X, Y, Z);
49 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
50 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
51 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
52 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
53 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
54 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
58 (MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
64 void Graphic3d_Group::Text (
65 const Standard_CString AText,
66 const Graphic3d_Vertex& APoint,
67 const Standard_Real AHeight,
68 const Standard_Boolean EvalMinMax
71 if (IsDeleted ()) return;
73 MyIsEmpty = Standard_False;
77 Standard_Real X, Y, Z;
78 APoint.Coord (X, Y, Z);
79 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
80 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
81 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
82 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
83 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
84 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
87 MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);
93 void Graphic3d_Group::Text (
94 const TCollection_ExtendedString& AText,
95 const Graphic3d_Vertex& APoint,
96 const Standard_Real AHeight,
97 const Quantity_PlaneAngle AAngle,
98 const Graphic3d_TextPath ATp,
99 const Graphic3d_HorizontalTextAlignment AHta,
100 const Graphic3d_VerticalTextAlignment AVta,
101 const Standard_Boolean EvalMinMax
104 if (IsDeleted ()) return;
106 if (! AText.IsAscii ()) return;
108 MyIsEmpty = Standard_False;
112 Standard_Real X, Y, Z;
113 APoint.Coord (X, Y, Z);
114 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
115 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
116 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
117 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
118 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
119 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
122 MyGraphicDriver->Text
123 (MyCGroup, AText, APoint, AHeight, AAngle, ATp, AHta, AVta, EvalMinMax);
129 void Graphic3d_Group::Text (
130 const TCollection_ExtendedString& AText,
131 const Graphic3d_Vertex& APoint,
132 const Standard_Real AHeight,
133 const Standard_Boolean EvalMinMax
136 if (IsDeleted ()) return;
138 if (! AText.IsAscii ()) return;
140 MyIsEmpty = Standard_False;
144 Standard_Real X, Y, Z;
145 APoint.Coord (X, Y, Z);
146 if (X < MyBounds.XMin) MyBounds.XMin = Standard_ShortReal (X);
147 if (Y < MyBounds.YMin) MyBounds.YMin = Standard_ShortReal (Y);
148 if (Z < MyBounds.ZMin) MyBounds.ZMin = Standard_ShortReal (Z);
149 if (X > MyBounds.XMax) MyBounds.XMax = Standard_ShortReal (X);
150 if (Y > MyBounds.YMax) MyBounds.YMax = Standard_ShortReal (Y);
151 if (Z > MyBounds.ZMax) MyBounds.ZMax = Standard_ShortReal (Z);
154 MyGraphicDriver->Text (MyCGroup, AText, APoint, AHeight, EvalMinMax);