aboutsummaryrefslogtreecommitdiffstats
path: root/src/javax/media/j3d/CanvasViewEventCatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/javax/media/j3d/CanvasViewEventCatcher.java')
-rw-r--r--src/javax/media/j3d/CanvasViewEventCatcher.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/javax/media/j3d/CanvasViewEventCatcher.java b/src/javax/media/j3d/CanvasViewEventCatcher.java
index aadbf5f..478a84c 100644
--- a/src/javax/media/j3d/CanvasViewEventCatcher.java
+++ b/src/javax/media/j3d/CanvasViewEventCatcher.java
@@ -26,6 +26,7 @@
package javax.media.j3d;
+import java.awt.Dimension;
import java.awt.IllegalComponentStateException;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
@@ -65,7 +66,8 @@ class CanvasViewEventCatcher extends ComponentAdapter {
// see comment below
try {
- canvas.newSize = canvas.getSize();
+ Dimension size = canvas.getSize();
+ canvas.newSize = new Dimension((int)(size.getWidth()*canvas.xscale), (int)(size.getHeight()*canvas.yscale));
canvas.newPosition = canvas.getLocationOnScreen();
} catch (IllegalComponentStateException ex) {}
@@ -90,7 +92,8 @@ class CanvasViewEventCatcher extends ComponentAdapter {
// first, then canvas lock in removeComponentListener()
try {
- canvas.newSize = canvas.getSize();
+ Dimension size = canvas.getSize();
+ canvas.newSize = new Dimension((int)(size.getWidth()*canvas.xscale), (int)(size.getHeight()*canvas.yscale));
canvas.newPosition = canvas.getLocationOnScreen();
} catch (IllegalComponentStateException ex) {}