[vtkusers] Object enlarging

Franz Th. Langer eplanung at t-online.de
Mon Oct 15 04:33:30 EDT 2001


 Id  like to enlarge my Object within the vtkWin32OffscreenRenderWindow.

The only working way I found is to use SetViewport in a very strange
manner.
(vtkActor->SetScale is not working neither are vtkCamera methods!)
There should definitely be another Method to do enlarging(Scaling),
because my way of doing cuts off the following text!

...

vtkRenderer*Renderer = vtkRenderer::New();
   Renderer->SetBackground(0.9,0.9,0.9);
  vtkWin32OffscreenRenderWindow*RenderWindow =
vtkWin32OffscreenRenderWindow::New();
   RenderWindow->AddRenderer(Renderer);
   RenderWindow->SetSize(512,512);

  float vp[4];
  vp[0]=-0.5; vp[1]=-0.3;
  vp[2]=1.5; vp[3]=1.3;
  Renderer->SetViewport(vp);

  vtkActor2D *act = vtkActor2D::New();
  vtkTextMapper *txt = vtkTextMapper::New();
  act->SetMapper(txt);
  txt->SetInput("Zeitschritt: "+LToS(i));
  txt->SetFontSize(24);
  Renderer->AddActor(act);
  txt->Delete();
  act->Delete();

....
any hints are welcome!
Franz




More information about the vtkusers mailing list