release 2.0.14 Beta

This commit is contained in:
hyb1996
2017-07-12 14:04:06 +08:00
parent 840318218b
commit 24f0043a0f
6 changed files with 31 additions and 5 deletions

View File

@@ -49,6 +49,19 @@ public class ScreenMetrics {
return y * deviceScreenHeight / height;
}
public static int rescaleX(int x, int width) {
if (width == 0 || !initialized)
return x;
return x * width / deviceScreenWidth;
}
public static int rescaleY(int y, int height) {
if (height == 0 || !initialized)
return y;
return y * height / deviceScreenHeight;
}
private int mScreenWidth;
private int mScreenHeight;