1 // File: Draw_Text2D.cxx
2 // Created: Wed Apr 29 15:37:27 1992
3 // Author: Remi LEQUETTE
7 #include <Draw_Text2D.ixx>
10 //=======================================================================
11 //function : Draw_Text2D
13 //=======================================================================
15 Draw_Text2D::Draw_Text2D(const gp_Pnt2d& p, const Standard_CString T,
16 const Draw_Color& col) :
17 myPoint(p), myColor(col), myText(T), mymoveX(0), mymoveY(0)
21 //=======================================================================
22 //function : Draw_Text2D
24 //=======================================================================
26 Draw_Text2D::Draw_Text2D(const gp_Pnt2d& p, const Standard_CString T,
27 const Draw_Color& col, const Standard_Integer moveX, const Standard_Integer moveY) :
28 myPoint(p), myColor(col), myText(T), mymoveX(moveX), mymoveY(moveY)
32 //=======================================================================
35 //=======================================================================
37 void Draw_Text2D::SetPnt2d(const gp_Pnt2d& p)
42 //=======================================================================
45 //=======================================================================
47 void Draw_Text2D::DrawOn(Draw_Display& dis) const
49 dis.SetColor(myColor);
50 dis.DrawString(myPoint,myText.ToCString(),
51 (Standard_Real)mymoveX, (Standard_Real)mymoveY);