0022627: Change OCCT memory management defaults
[occt.git] / src / TestTopOpeDraw / TestTopOpeDraw_DrawableP2D.cxx
CommitLineData
7fd59977 1// File: TestTopOpeDraw_DrawableP2D.cxx
2// Created: Thu Nov 17 16:42:42 1994
3// Author: Jean Yves LEBEY
4// <jyl@bravox>
5
6#include <TestTopOpeDraw_DrawableP2D.ixx>
7
8//=======================================================================
9//function : TestTopOpeDraw_DrawableP2D
10//purpose :
11//=======================================================================
12
13TestTopOpeDraw_DrawableP2D::TestTopOpeDraw_DrawableP2D
14(const gp_Pnt2d& P,
15 const Draw_Color& PColor,
16 const Standard_Real MoveX,
17 const Standard_Real MoveY) :
18 Draw_Marker2D(P,Draw_Square,PColor,2), // Size
19 myPnt2d(P),
20 myText(" "),
21 myTextColor(PColor),
22 myMoveX(MoveX),
23 myMoveY(MoveY)
24{
25 myText2D = new Draw_Text2D(myPnt2d,myText,myTextColor,(Standard_Integer)myMoveX,(Standard_Integer)myMoveY);
26}
27
28//=======================================================================
29//function : TestTopOpeDraw_DrawableP2D
30//purpose :
31//=======================================================================
32
33TestTopOpeDraw_DrawableP2D::TestTopOpeDraw_DrawableP2D
34(const gp_Pnt2d& P,const Draw_Color& PColor,
35 const Standard_CString Text,const Draw_Color& TextColor,
36 const Standard_Real MoveX,
37 const Standard_Real MoveY) :
38 Draw_Marker2D(P,Draw_Square,PColor,2), // Size
39 myPnt2d(P),
40 myText(Text),
41 myTextColor(TextColor),
42 myMoveX(MoveX),
43 myMoveY(MoveY)
44{
45 myText2D = new Draw_Text2D(myPnt2d,myText,myTextColor,(Standard_Integer)myMoveX,(Standard_Integer)myMoveY);
46}
47
48//=======================================================================
49//function : TestTopOpeDraw_DrawableP2D
50//purpose :
51//=======================================================================
52
53TestTopOpeDraw_DrawableP2D::TestTopOpeDraw_DrawableP2D
54(const gp_Pnt2d& P,const Draw_MarkerShape T,const Draw_Color& PColor,
55 const Standard_CString Text,const Draw_Color& TextColor,
56 const Standard_Integer Size,
57 const Standard_Real MoveX,
58 const Standard_Real MoveY) :
59 Draw_Marker2D(P,T,PColor,Size),
60 myPnt2d(P),
61 myText(Text),
62 myTextColor(TextColor),
63 myMoveX(MoveX),
64 myMoveY(MoveY)
65{
66 myText2D = new Draw_Text2D(myPnt2d,myText,myTextColor,(Standard_Integer)myMoveX,(Standard_Integer)myMoveY);
67}
68
69//=======================================================================
70//function : TestTopOpeDraw_DrawableP2D
71//purpose :
72//=======================================================================
73
74TestTopOpeDraw_DrawableP2D::TestTopOpeDraw_DrawableP2D
75(const gp_Pnt2d& P,const Draw_MarkerShape T,
76 const Draw_Color& PColor,const Standard_CString Text,
77 const Draw_Color& TextColor,const Standard_Real Tol,
78 const Standard_Real MoveX,const Standard_Real MoveY) :
79 Draw_Marker2D(P,T,PColor,Tol),
80 myPnt2d(P),
81 myText(Text),
82 myTextColor(TextColor),
83 myMoveX(MoveX),
84 myMoveY(MoveY)
85{
86 myText2D = new Draw_Text2D(myPnt2d,myText,myTextColor,(Standard_Integer)myMoveX,(Standard_Integer)myMoveY);
87}
88
89//=======================================================================
90//function : ChangePnt2d
91//purpose :
92//=======================================================================
93
94void TestTopOpeDraw_DrawableP2D::ChangePnt2d(const gp_Pnt2d& P)
95{
96 myPnt2d = P;
97 myText2D = new Draw_Text2D(myPnt2d,myText,myTextColor,(Standard_Integer)myMoveX,(Standard_Integer)myMoveY);
98 ChangePos() = P;
99}
100
101//=======================================================================
102//function : DrawOn
103//purpose :
104//=======================================================================
105
106void TestTopOpeDraw_DrawableP2D::DrawOn(Draw_Display& dis) const
107{
108 Draw_Marker2D::DrawOn(dis);
109 myText2D->DrawOn(dis);
110}