[vtk-developers] Supporting Resolution Independence in Cocoa

David Cole david.cole at kitware.com
Tue May 22 18:01:39 EDT 2007


>We suggest that VTK APIs be pixel-based, for the above reasons and also
>because OpenGL itself is pixel-based. If you agree, we could provide a
>patch for Cocoa windows.

I agree with this suggestion. If your patch is Cocoa-specific and all
existing tests pass on Cocoa builds with your patch, then go for it. Just
keep an eye on the non-Rogue Cocoa dashboards after your commit.

Is there conditional code based on Mac OSX version? You didn't submit the
patch with your original email...

Thx,
David

On 5/22/07, Sean McBride <sean at rogue-research.com> wrote:
>
> Hi again everyone,
>
> How should we interpret the silence on this issue? :)  My guess is that
> resolution independence is not of immediate concern to anyone, which is
> fine, and not too surprising.  :)
>
> That being the case, should we go ahead and commit our patch?  It is
> small, and harmless when the scaling factor is 1.0 (the usual case).
>
> Cheers,
>
> Sean
>
>
>
> On 2007-05-10 15:38, Mathieu Coursolle said:
>
> >Hi vtk developers,
> >
> >Starting in Mac OS X 10.4 (and planned to be fully supported in 10.5) is
> >user interface resolution scaling. This means that the screen coordinate
> >system is no longer in pixels, but rather in points. Normally, 1 point =
> >1 pixel, but users might decide to change their settings to set the
> >scaling to a value higher than 1. See here for more info on the concept:
> ><http://en.wikipedia.org/wiki/Resolution_independence>
> >
> >For example, let's say we want to create a 100 by 100 window on a system
> >for which the scale factor is 1.25, then the actual pixel size of the
> >window would be 125 pixels.
> >
> >This does not seem to be supported by VTK, as the size of the window is
> >assumed to be in pixels, while it is in fact in points on Mac OS X 10.4
> >and later.
> >
> >We have a patch to allow VTK to support resolution independence, but
> >would like some feedback from other vtk developers.
> >
> >Q1) Should VTK APIs be pixel-based or point-based?  For example, is the
> >vtkWindow::GetSize() method meant to return values as pixels?
> >
> >If so, some additionnal code could be written in the specialized class
> >of vtkWindow (ex: vtkCocoaRenderWindow) so that the GetSize() method
> >returns the actual pixel size of the window rather than its point size.
> >Of course, the specialized interactors should also convert their screen
> >positions from points to pixels.
> >
> >Q2) How to deal with tests that compare against images?
> >
> >This brings up another issue. If a 100 x 100 window is created, should
> >it be 100 pixels or 100 points? If it is 100 points, this means that it
> >might not be 100 pixels on screen. If so, most of the dashboard tests
> >will fail because the comparison images are in pixels.
> >
> >We suggest that VTK APIs be pixel-based, for the above reasons and also
> >because OpenGL itself is pixel-based. If you agree, we could provide a
> >patch for Cocoa windows.
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20070522/7c423acc/attachment.html>


More information about the vtk-developers mailing list