[vtkusers] border for viewports

Henrik Westerberg henrik.westerberg at crg.es
Wed Aug 22 04:41:00 EDT 2007


Hi Meisam,

You can make a border of sorts by doing this:

ren1 = vtkRenderer()
ren1.SetBackground(1.0, 1.0, 1.0)
ren1.SetViewport(0, 0, 0.499, 1.0)       

ren3 = vtkRenderer()
ren3.SetBackground(0.0, 0.0, 0.0)
ren3.SetViewport(0.499, 0, 0.501, 1)

ren2 = vtkRenderer()
ren2.SetBackground(1.0, 1.0, 1.0)
ren2.SetViewport(0.501, 0, 1, 1)

renWin = vtkRenderWindow()
renWin.SetSize(1000,500)
renWin.AddRenderer(ren1)
renWin.AddRenderer(ren2)
renWin.AddRenderer(ren3)

Should work vertically too.

Henrik

-----Original Message-----
From: vtkusers-bounces+henrik.westerberg=crg.es at vtk.org on behalf of Meisam Aliroteh
Sent: Tue 8/21/2007 11:00 PM
To: vtkusers at vtk.org
Subject: [vtkusers] border for viewports
 
Hi,

I have a render window that is vertically split into 2 pieces and each piece
has its own renderer. Both of these renderers must have a white background
so it is difficult to visualize where one viewport ends and the other
begins. I want to know if there is a way in vtk to show borders (like a
rectangle) around each renderer?

thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070822/93693c4f/attachment.htm>


More information about the vtkusers mailing list