[vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode

Hongzhi Lan hongzhi at stanford.edu
Fri Sep 2 19:00:01 EDT 2016


Hi Sean,


Thank for the advice. I tried the patch, but it doesn't work. The vtkrenderwindow still occupies the left-bottom quarter of widget.


Best,

Hongzhi

________________________________
From: Sean McBride <sean at rogue-research.com>
Sent: Friday, September 2, 2016 12:44:48 PM
To: Hongzhi Lan; vtkusers at vtk.org
Subject: Re: [vtkusers] scaling issue of vtkrenderwindow in QVTKWidget for Mac in High Resolution mode

On Fri, 2 Sep 2016 19:18:51 +0000, Hongzhi Lan said:

>I recently tested the example RenderWindowNoUiFile from VTK in Mac ,and
>found the renderwindow only occupies the left-bottom quarter of the
>QVTKWidget (shown in the attached image). I know someone mentioned this
>issue and you can avoid it by using "Open in Low Resolution". But with a
>very good high(retina) resolution mac computer, you can only open a Qt-
>vtk-dependent application in "Low Resolution" and get a blurry GUI,
>which seems not ok to users who are using high resolution mac computer.
>I was wondering if vtk developers will fix this issue in the nearest future.
>
>
>By doing some web search, I know the reason is: In Hidpi (such as retina
>resolution in macbook pro), 1x1 pixel becomes 2x2 pixels. Qt can
>recognize it, so the widget size is right, but vtk can't, so
>vtkRenderWindow only occupies a quarter of the widget size. I tried to
>modify the source code of QVTKWidget class by doubling the size of
>vtkRenderingWindow in the QVTKWidget, but it did't change anything. So
>it's not so straightforward as I expected.  Can anyone give me some
>suggestion about how to fix the issue and what classes I need to modify?

Can you try with this patch?
<https://gitlab.kitware.com/vtk/vtk/merge_requests/1797>

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com<http://www.rogue-research.com>
Mac Software Developer              Montréal, Québec, Canada


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160902/b4342995/attachment.html>


More information about the vtkusers mailing list