1 // ISession_Text.cpp: implementation of the ISession_Text class.
3 //////////////////////////////////////////////////////////////////////
6 #include "..\\GeometryApp.h"
7 #include "ISession_Text.h"
11 static char THIS_FILE[]=__FILE__;
12 //#define new DEBUG_NEW
15 IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
17 //////////////////////////////////////////////////////////////////////
18 // Construction/Destruction
19 //////////////////////////////////////////////////////////////////////
21 ISession_Text::ISession_Text()
26 ISession_Text::ISession_Text
27 (const TCollection_AsciiString& aText,
28 const Standard_Real anX , // = 0
29 const Standard_Real anY , // = 0
30 const Standard_Real aZ , // = 0
31 const Quantity_PlaneAngle anAngle, // = 0.0
32 const Standard_Real aslant, // = 0.0
33 const Standard_Integer aColorIndex, // = 0
34 const Standard_Integer aFontIndex, // = 1
35 const Quantity_Factor aScale) // = 1
36 :AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ),
37 MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
38 MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
43 ISession_Text::ISession_Text
44 (const TCollection_AsciiString& aText,
46 const Quantity_PlaneAngle anAngle, // = 0.0
47 const Standard_Real aslant, // = 0.0
48 const Standard_Integer aColorIndex, // = 0
49 const Standard_Integer aFontIndex, // = 1
50 const Quantity_Factor aScale) // = 1
51 :AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()),
52 MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
53 MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
58 ISession_Text::~ISession_Text()
63 void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
64 const Handle(Prs3d_Presentation)& aPresentation,
65 const Standard_Integer /*aMode*/)
67 Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), myDrawer->TextAspect(), MyText, gp_Pnt(MyX, MyY, MyZ));
70 void ISession_Text::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
71 const Handle(Prs3d_Presentation)& /*aPresentation*/)
75 void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
76 const Standard_Integer /*unMode*/)