summaryrefslogtreecommitdiff
path: root/src/Draw/Draw_Text3D.cxx
blob: 1a9cfa374f89b007d37d4aae2c8862cb17d377b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// File:	Draw_Text3D.cxx
// Created:	Wed Apr 29 15:37:27 1992
// Author:	Remi LEQUETTE
//		<rle@sdsun1>


#include <Draw_Text3D.ixx>

//=======================================================================
//function : Draw_Text3D
//purpose  : 
//=======================================================================

Draw_Text3D::Draw_Text3D(const gp_Pnt& p, const Standard_CString T, 
			 const Draw_Color& col) :
     myPoint(p), myColor(col), myText(T), mymoveX(0.0), mymoveY(0.0)
{
}

//=======================================================================
//function : Draw_Text3D
//purpose  : 
//=======================================================================

Draw_Text3D::Draw_Text3D(const gp_Pnt& p, const Standard_CString T, 
			 const Draw_Color& col,
			 const Standard_Real moveX, const Standard_Real moveY) :
       myPoint(p), myColor(col), myText(T), mymoveX(moveX), mymoveY(moveY)
{
}

//=======================================================================
//function : SetPnt
//purpose  : 
//=======================================================================

void Draw_Text3D::SetPnt(const gp_Pnt& p)
{
  myPoint = p;
}

//=======================================================================
//function : DrawOn
//purpose  : 
//=======================================================================

void Draw_Text3D::DrawOn(Draw_Display& dis) const
{
  dis.SetColor(myColor);
  dis.DrawString(myPoint,myText.ToCString(),
		 mymoveX, mymoveY);
}