aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jsyn/swing/XYController.java
diff options
context:
space:
mode:
authorPhil Burk <[email protected]>2014-12-30 17:54:28 -0800
committerPhil Burk <[email protected]>2014-12-30 17:54:28 -0800
commit6bed96c300097e29760330afaafeba44bb943470 (patch)
tree4bee0dbd44087c5b88eaad251668a4e3f6350475 /src/com/jsyn/swing/XYController.java
parente4cb838aa8a9eff7332069c421001df37689af91 (diff)
Remove obsolete com.softsynth.util package.
Fix a few warnings.
Diffstat (limited to 'src/com/jsyn/swing/XYController.java')
-rw-r--r--src/com/jsyn/swing/XYController.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/jsyn/swing/XYController.java b/src/com/jsyn/swing/XYController.java
index 49cb9fd..b9cf90a 100644
--- a/src/com/jsyn/swing/XYController.java
+++ b/src/com/jsyn/swing/XYController.java
@@ -91,23 +91,23 @@ public class XYController extends JPanel {
/** Convert from graphics coordinates (pixels) to world coordinates. */
public double convertGXtoWX(int gx) {
- int width = bounds().width;
+ int width = getWidth();
return minWorldX + ((maxWorldX - minWorldX) * gx) / width;
}
public double convertGYtoWY(int gy) {
- int height = bounds().height;
+ int height = getHeight();
return minWorldY + ((maxWorldY - minWorldY) * (height - gy)) / height;
}
/** Convert from world coordinates to graphics coordinates (pixels). */
public int convertWXtoGX(double wx) {
- int width = bounds().width;
+ int width = getWidth();
return (int) (((wx - minWorldX) * width) / (maxWorldX - minWorldX));
}
public int convertWYtoGY(double wy) {
- int height = bounds().height;
+ int height = getHeight();
return height - (int) (((wy - minWorldY) * height) / (maxWorldY - minWorldY));
}