comparison game/IDMWidget.java @ 170:b9bc493ae53c

Modularize and clean up code.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 02 Mar 2017 15:57:15 +0200
parents e8eeac403e5f
children 5070e57ebbfc
comparison
equal deleted inserted replaced
169:32b1c41e194a 170:b9bc493ae53c
86 public int getScaledY() 86 public int getScaledY()
87 { 87 {
88 return (int) (pos.y * scale.y); 88 return (int) (pos.y * scale.y);
89 } 89 }
90 90
91 public int getScaledX(float x)
92 {
93 return (int) (x * scale.x);
94 }
95
96 public int getScaledY(float y)
97 {
98 return (int) (y * scale.y);
99 }
100
101 public int getScaledRelX(float x)
102 {
103 return (int) ((pos.x + x) * scale.x);
104 }
105
106 public int getScaledRelY(float y)
107 {
108 return (int) ((pos.y + y) * scale.y);
109 }
110
91 public int getScaledWidth() 111 public int getScaledWidth()
92 { 112 {
93 return (int) (size.x * scale.x); 113 return (int) (size.x * scale.x);
94 } 114 }
95 115