I’m using the screen capture example code found here to grab a ListBox as an image https://forum.xojo.com/8025-htmlviewer-image-to-canvas-question?search=ControlSnapShot
The code is pre Retina and creates unexpected results on Macs with Retina displays. For Retina displays I need to double up on the values to correctly grab the portion of the screen capture.
I’m looking for a way to simply check for a retina display so I can then decide how to handle the screen capture image appropriately.
check if the window containing the html viewer has a scale factor of 1 or 2
http://documentation.xojo.com/api/deprecated/window.html#window-scalefactor
Thank you Norman. My old brain was searching the LR for Gestalt values.
Apple recommend the use of a function like NSRectCovertToBacking and pass in a rectangle, the resulting rectangle will be of the correct dimensions.
This allows for a single window to contain multiple representations; even through the OS no longer allows a window to span multiple screens.
If you’d like to use something like this I can whip a simple demo project.