Hello, I have this piece of code, which puts 4 vtkRenderers in 1 Window, which are separated (aka 4 screens in 1 window). And I wanted to make feature of Maximize/Minimizing each screen, and thats where I’ve stuck.
I thought that just setting all viewports to (0, 0, 0, 0) (and then set “maximized” viewport to (0, 0, 1, 1) and then just reverse viewports back to original values) would solve the problem, but setting viewports kinda behaves weirdly, other renderers just stop display their content after resizing viewports back to original.
Is this even a correct way of minimizing/maximizing screens, or there are far better ways?
renWin = vtkRenderWindow();
RendererArray = [None]*4;
for i in range(0,4):
RendererArray[i] = vtkRenderer();
renWin.AddRenderer(RendererArray[i]);
RendererArray[0].SetViewport(0, 0, 0.5, 0.5);
RendererArray[1].SetViewport(0.5, 0, 1, 0.5);
RendererArray[2].SetViewport(0, 0.5, 0.5, 1);
RendererArray[3].SetViewport(0.5, 0.5, 1, 1);
renWin.Render();