How to determine if a captured retina window is displayed on the retina screen?
If I close the window using something like ...
CGImageRef imageRef = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, kCGWindowImageBoundsIgnoreFraming);
and say the window borders were something like ...
kCGWindowBounds = {
Height = 150;
Width = 490;
X = 395;
Y = 174;
};
If the window was displayed on a retina screen, the kCGWindowBounds height would be specified as 300 or 150, but the resulting captured image would be 300?
Thanks in advance, one of these things is without retina display. I'm not sure and I think it will be useful for developers too.
+3
source to share
1 answer
Ok, found the answer using Quartz-Debug to enable hidp modes and dragged the window onto the screen with hidp enabled.
Answer: The height / width of the window borders is the same regardless of the retina or not. But the captured image will be 2 times larger if displayed on the retina screen.
I expected this to be the case, but doesn't want to make any assumptions.
+3
source to share