0023006: Improvement to debug memory leaks and insufficient memory growths.
[occt.git] / src / OpenGl / OpenGl_GraphicDriver_710.cxx
CommitLineData
2166f0fa
SK
1// File: OpenGl_GraphicDriver_710.cxx
2// Created: 20 October 2011
3// Author: Sergey ZERCHANINOV
4// Copyright: OPEN CASCADE 2011
7fd59977 5
2166f0fa 6#include <OpenGl_GraphicDriver.hxx>
7fd59977 7
7fd59977 8#include <TCollection_AsciiString.hxx>
2166f0fa
SK
9#include <OpenGl_Group.hxx>
10#include <OpenGl_Text.hxx>
7fd59977 11
12void OpenGl_GraphicDriver::Text
13(
14 const Graphic3d_CGroup& ACGroup,
15 const Standard_CString AText,
16 const Graphic3d_Vertex& APoint,
17 const Standard_Real AHeight,
18 const Quantity_PlaneAngle AAngle,
19 const Graphic3d_TextPath ATp,
20 const Graphic3d_HorizontalTextAlignment AHta,
21 const Graphic3d_VerticalTextAlignment AVta,
13a22457 22 const Standard_Boolean EvalMinMax
7fd59977 23 )
24{
13a22457
S
25 TCollection_ExtendedString TheText(AText);
26 OpenGl_GraphicDriver::Text(ACGroup,TheText,APoint,AHeight,AAngle,ATp,AHta,AVta,EvalMinMax);
7fd59977 27}
28
29void OpenGl_GraphicDriver::Text
30(
31 const Graphic3d_CGroup& ACGroup,
32 const Standard_CString AText,
33 const Graphic3d_Vertex& APoint,
34 const Standard_Real AHeight,
13a22457 35 const Standard_Boolean EvalMinMax
7fd59977 36 )
37{
13a22457
S
38 TCollection_ExtendedString TheText(AText);
39 OpenGl_GraphicDriver::Text(ACGroup,TheText,APoint,AHeight,EvalMinMax);
7fd59977 40}
41
42void OpenGl_GraphicDriver::Text
43(
44 const Graphic3d_CGroup& ACGroup,
45 const TCollection_ExtendedString& AText,
46 const Graphic3d_Vertex& APoint,
47 const Standard_Real AHeight,
48 const Quantity_PlaneAngle AAngle,
49 const Graphic3d_TextPath ATp,
50 const Graphic3d_HorizontalTextAlignment AHta,
51 const Graphic3d_VerticalTextAlignment AVta,
52 const Standard_Boolean
53 )
54{
2166f0fa
SK
55 if (ACGroup.ptrGroup)
56 {
57 Standard_Real theHeight = AHeight;
58 if (theHeight < 0.)
59 theHeight = DefaultTextHeight();
60
61 OpenGl_Text *atext = new OpenGl_Text( AText, APoint, theHeight, AHta, AVta );
62 ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelText, atext );
7fd59977 63 }
7fd59977 64}
65
66void OpenGl_GraphicDriver::Text
67(
68 const Graphic3d_CGroup& ACGroup,
69 const TCollection_ExtendedString& AText,
70 const Graphic3d_Vertex& APoint,
71 const Standard_Real AHeight,
72 const Standard_Boolean
13a22457
S
73 )
74{
2166f0fa
SK
75 if (ACGroup.ptrGroup)
76 {
77 Standard_Real theHeight = AHeight;
78 if (theHeight < 0.)
79 theHeight = DefaultTextHeight();
80
81 OpenGl_Text *atext = new OpenGl_Text( AText, APoint, theHeight, Graphic3d_HTA_LEFT, Graphic3d_VTA_BOTTOM );
82 ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelText, atext );
13a22457 83 }
13a22457 84}