Mercurial > hg > Papers > 2020 > riono-thesis
view FinalThesis/src/RetinaScale.java @ 35:a95ea8f61214
update Slide and mid
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 16 Feb 2020 22:52:07 +0900 |
parents | fce3f9c18d8d |
children |
line wrap: on
line source
public static int getRetinaScale(int shareScreenNumber) { int scale = 1; GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); final GraphicsDevice[] devices = env.getScreenDevices(); GraphicsConfiguration conf = devices[shareScreenNumber].getDefaultConfiguration(); scale = (int)conf.getDefaultTransform().getScaleX(); return scale; }