[vtkusers] VTK-5.0 prints white text

Martin Baumann mailsgetlost at web.de
Thu Feb 2 14:19:57 EST 2006


Hi,

the following code should draw a black text "Test" in the lower left corner. Background white:

  _logo_mapper = vtkTextMapper::New();
  _logo_actor =  vtkActor2D   ::New();

  _logo_mapper->SetInput("Test");

  _logo_actor->SetMapper(_logo_mapper);
  _logo_actor->GetProperty()->SetColor(0.0,0.0,0.0);
  _logo_actor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
  _logo_actor->GetPositionCoordinate()->SetValue(0.1,0.1,0.1);

  _logo_mapper->Delete(); // Ref. counted !

  _ren = vtkRenderer::New();
  _ren_win->AddRenderer(_ren);
  _ren->SetBackground(1.,1.,1.);
  _ren->Delete(); // Ref. counted !
  _ren->AddActor2D(_logo_actor);

  _logo_actor->Delete(); // Ref. counted !

I get a white text on white background! This remains the same if I change SetColor() to some other values.
When I run the same code with VTK-4.2 the thing works just that way!

Any idea?

Thanks, MB


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the vtkusers mailing list