[vtk-developers] issue with interactor in viewport
Audrey Chan
audreyc at sonic.net
Fri Apr 21 13:58:40 EDT 2017
I currently have two viewports (a left and right viewport) but the
interactorstlye for the right viewport isn't working correctly. It
should display the labels of the different slices of the pie chart on
hover, but the hovering only works in the left viewport. It looks like
the "position" of the interactor is off. I attached a screenshot of this
issue (this is when my mouse is hovering over the left viewport).
# Set up a 2D scene, add a chart to it
view = vtk.vtkContextView()
chart = vtk.vtkChartPie()
# Add renderer to render window and set viewport
renWin.AddRenderer(view.GetRenderer())
view.GetScene().AddItem(chart)
view.GetRenderer().SetViewport(viewport2[0], viewport2[1], viewport2[2],
viewport2[3])
# Allow interactive piechart
style = vtk.vtkContextInteractorStyle()
style.SetScene(view.GetScene())
renWinInter.SetInteractorStyle(style)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170421/18b55385/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-04-21 at 10.58.02 AM.png
Type: image/png
Size: 64785 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170421/18b55385/attachment-0001.png>
More information about the vtk-developers
mailing list