Anonymous (not verified) Fri, 09/27/2002 - 10:26 Forums: Other usage issuesHi, How can I display a text in a v3d_view that when the zoom is changing the text's size is not changing. Thanks in advance. Lugi.C ekiroglu Mon, 09/30/2002 - 18:35 Hello, You can create a class like ISession_Text : ... void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode) { Prs3d_Text::Draw(aPresentation,myDrawer,MyText,gp_Pnt( MyX ,MyY,MyZ )); } ... Then, in your class in which you will create text: Handle(ISession_Text)aGraphicText = new ISession_Text(aText, aPoint, Aspect_TOT_SOLID, 0.0, 0.5, 5, 2, 0.5 ); GetDocument()->GetAISContext()->Display(aGraphicText,1,-1); I hope this will be helpfull. Best Regards, Erki Log in to post comments
Mon, 09/30/2002 - 18:35
Hello,
You can create a class like ISession_Text :
...
void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode)
{
Prs3d_Text::Draw(aPresentation,myDrawer,MyText,gp_Pnt( MyX ,MyY,MyZ ));
}
...
Then, in your class in which you will create text:
Handle(ISession_Text)aGraphicText = new ISession_Text(aText, aPoint, Aspect_TOT_SOLID, 0.0, 0.5, 5, 2, 0.5 );
GetDocument()->GetAISContext()->Display(aGraphicText,1,-1);
I hope this will be helpfull.
Best Regards,
Erki