[vtk-developers] HiDPI / Retina display support
    Sean McBride 
    sean at rogue-research.com
       
    Thu Aug 25 11:09:59 EDT 2016
    
    
  
On Wed, 10 Aug 2016 14:19:42 -0400, Marcus D. Hanwell said:
>> - which VTK API should be pixel-based, which should be point-based? 
>Presumably everything is pixel based today, do we want to change any? 
>If so, some API would need to change from int to double.
>
>I think everything should be pixel-based, and Qt has a similar view for
>OpenGL.
So the current implementation of vtkCocoaRenderWindow::GetScreenSize() returns points, not pixels.
But, after searching VTK for GetScreenSize:
 1- I see that all implementations are broken with respect to multi-monitor setups.
 2- its docs say "Get the current size of the screen in pixels".  Which is *the* screen?
 3- implementations (dangerously) return an inner pointer
 4- it's hardly used within VTK itself, only in:
   (a) internal calculations to decide full screen window size
   (b) vtkParallelRenderManager::SetRenderWindowSize()
What's the use case of this API anyway?
For the 4a use above, for Cocoa at least, returning points is actually preferable, because the Cocoa window-creation APIs take points.
My current inclination is to deprecate this API (point 3 is enough IMHO).
Thoughts?
Cheers,
-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada
    
    
More information about the vtk-developers
mailing list