Okay, a REALLY fundamental question about window sizes here...
If I create an NSWindow in IB, set its size to 216 x 144 points (exactly 3 inches by 2 inches) then print the window, it measures exactly what I set it to in IB. However, the onscreen display size measures approximately 156 x 105 points.
What causes this, and is there an开发者_如何学Pythony way to force the window to display at the actual size onscreen? I ultimately want to draw to this (semi-transparent) window then use it as a full-sized overlay for comparison against a separately loaded scanned image of known size.
I'm going to guess that the DPI (aka PPI) setting in your OS is wrong, and so your display itself is mis-calibrated causing stuff drawn on the screen to be smaller than it really is. If your display is "high resolution" this is the likely cause. This is why "everything looks small" or you can "get more screen real-estate" on high-res displays. It's because the thing is mis-calibrated. Once your OS's DPI is set to match the screen's actual DPI, things drawn to the screen (in a resolution-independent manner) will display at the correct size.
Your printer is using the right DPI settings, so it's printing things at the right size.
In order to determine your actual DPI, you should be able to find display DPI calculators on the web. You should also be able to find instructions for your OS on how to change it. At least in windows, only vista and newer really handle different DPI settings well.
精彩评论