IMPLEMENT_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
-#include <Graphic2d_Text.hxx>
-#include <Select2D_SensitiveBox.hxx>
-#include <Graphic2d_Segment.hxx>
-#include <OSD_Environment.hxx>
-#include <Graphic2d_View.hxx>
-#include <Graphic2d_Drawer.hxx>
-#include "PrsMgr_PresentationManager2d.hxx"
-#include "SelectMgr_Selection.hxx"
-#include "Graphic2d_Array1OfVertex.hxx"
-#include "Graphic2d_Polyline.hxx"
-#include "Graphic2d_Vertex.hxx"
-#include "Graphic2d_DisplayList.hxx"
-#include "Prs3d_Text.hxx"
-
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
}
-
ISession_Text::ISession_Text
(const TCollection_AsciiString& aText,
const Standard_Real anX , // = 0
:AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ),
MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
-{}
+{
+
+}
ISession_Text::ISession_Text
(const TCollection_AsciiString& aText,
:AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()),
MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
-{}
-
+{
+}
ISession_Text::~ISession_Text()
{
{
}
-void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
- const Handle(Graphic2d_GraphicObject)& aGrObj,
- const Standard_Integer unMode)
-{
- Handle(Graphic2d_Text) text;
- text = new Graphic2d_Text(aGrObj, MyText, MyX, MyY, MyAngle,MyTypeOfText,MyScale);
- text->SetFontIndex(MyFontIndex);
-
- text->SetColorIndex(MyColorIndex);
-
- text->SetSlant(MySlant);
- text->SetUnderline(Standard_False);
- text->SetZoomable(Standard_True);
- aGrObj->Display();
- Quantity_Length anXoffset,anYoffset;
- text->TextSize(MyWidth, MyHeight,anXoffset,anYoffset);
-
-}
-
void ISession_Text::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
const Standard_Integer unMode)
{