[vtkusers] problem in vtkTextActor

Imran Ahmed Khan imran.ahmed.khan at gmail.com
Wed Nov 9 10:43:23 EST 2005


Hi all,
 How can I get a vtkTextActor to rotate, spin and move, whenever I put some
text in the drawing window using vtkTextActor it just remains at its intial
position. Here is the code which I am using:
  vtkTextActor *atextActor = vtkTextActor::New();
atextActor->ScaledTextOn();
atextActor->SetDisplayPosition(90, 50);
atextActor->SetInput("The text should move like other objects");
atextActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
atextActor->GetPosition2Coordinate()->SetValue(0.6, 0.1);
atextActor->GetTextProperty()->SetFontSize(18);
atextActor->GetTextProperty()->SetFontFamilyToArial();
atextActor->GetTextProperty()->SetJustificationToCentered();
atextActor->GetTextProperty()->BoldOn();
atextActor->GetTextProperty()->SetColor(0, 0, 1);
d_renderer->AddActor2D(atextActor);
 Any help would be highly appreciated. As I am trying to find a solution for
quite a while. If its not possible that the text can rotate or spin when
using vtrkTextActor then is there a way that the text shoud not
increase/decrease in size when I zoom in/out the window but can rotate, spin
and move in the window like other drawing objects.
 Best Regards,
Imran Ahmed Khan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051109/37c533f6/attachment.htm>


More information about the vtkusers mailing list