Is There A Way To Disable Mac OS Retina Scaling For A Swing App?

本小妞迷上赌 提交于 2019-12-01 04:08:32

问题


We have a rather complex application that needs as much screen real-estate as it can get, naturally the retina display Mac Books are excellent for this purpose.

However, it seems that in Swing those devices use points rather than pixels. They allow me to change the icons to higher resolution versions as discussed here. But since we do a lot of complex graphics and components overlays I want to just use "real pixels". To be clear I am not interested in fixing blurry images or icons (not practical in my case) just to disable the pixel doubling.

There is this interesting (albeit hacky) option I found thru this question.


回答1:


To my knowledge this is not possible as of JDK 1.8. The only workaround is to detect retina and use the scale affine transform when drawing. However, detecting retina seems to be a problem since the only option that seems to be available isn't on a per monitor case which is probably not a good solution: How can I detect whether a Mac has a Retina display from Java?



来源:https://stackoverflow.com/questions/25906175/is-there-a-way-to-disable-mac-os-retina-scaling-for-a-swing-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!