Hi, question for the Java2D team:
I've noticed that on Windows, GraphicsConfiguration.getDefaultTransform() and GraphicsConfiguration.getNormalizingTransform() always return the identity transform for screen devices, i.e. 72dpi. I realise that getting accurate physical device measurements is impossible since Windows doesnt know how big my screen is. Still, Windows does report a resolution which is usally 96dpi. Other Windows applications base their measurements on this value and consider 96 pixels to be one inch. Infact, Toolkit.getScreenResolution() returns 96 as expected.
I looked at the Mustang sources and was suprised to find that Win32GraphicsConfig includes getXResolution() and getYResolution() methods which are hardcoded to 72! By contrast, X11GraphicsConfig makes native calls to obtain these values.
So why doesnt Win32GraphicsConfig use the same mechanism as the Toolkit to get the screen resolution? Isn't it better if these two APIs are consistent?
It's not a big deal. I can just do a scale based on the Toolkit value instead, since I want my application to appear consistent with similar Windows applications, but i'd rather use getDefaultTransform() if I could. I'm just curious, is there a reason for the screen res being hardcoded at 72dpi?