annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 public static int getRetinaScale(int shareScreenNumber) {
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 int scale = 1;
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 final GraphicsDevice[] devices = env.getScreenDevices();
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 GraphicsConfiguration conf = devices[shareScreenNumber].getDefaultConfiguration();
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 scale = (int)conf.getDefaultTransform().getScaleX();
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 return scale;
fce3f9c18d8d add src and update chapter4
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 }