[vtkusers] Usage of vtkLabelRenderStrategy

Oliver Kania kania.oliver at googlemail.com
Thu May 13 08:15:37 EDT 2010


Hello,

I frequently use vtkTextActor within a graphics library I wrote.
Is it somehow possible to replace these occurences with a
vtkLabelRenderStrategy, maybe within a vtkContextDevice ?
The reason I want to do this is simply to enable rendering of unicode
characters, more precisely certain characters
that are not within the 7-Bit ascii set which text actor allows.

The following sample code does not show any text :

--------------------------------------------------------------------------------
vtkRenderWindow *renWin = vtkRenderWindow::New();
  renWin->AddRenderer( ren1 );
  renWin->SetSize( 300, 300 );
  vtkStdString l_vtkStdStr("Hallo");
float f_coords[] = {50.0f,50.0f};

l_vtkDevice->Begin(ren1);
l_vtkDevice->DrawString(f_coords,l_vtkProp,l_vtkStdStr);
l_vtkDevice->End();

      renWin->GetInteractor()->Render();
--------------------------------------------------------------------------------

I also tried using vtkLabelRenderStrategy directly etc.

Best Regards,
Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100513/d9ca7de7/attachment.htm>


More information about the vtkusers mailing list