Hacked in a somewhat functional zoom for the image editor.

This commit is contained in:
Martin Haye 2014-08-10 17:23:43 -07:00
parent c7c969d2d0
commit ced78e2a58

View File

@ -194,6 +194,11 @@ public class AppleImageEditor extends ImageEditor implements EventHandler<MouseE
//
// double newLeft = (left + pointerX) * ratio - pointerX;
// double newTop = (top + pointerY) * ratio - pointerY;
// Scale the image and move it so the upper-left corner is still in the right place.
screen.setScaleX(zoom);
screen.setScaleY(zoom);
screen.setTranslateX(getWidth()*7 * (zoom-1));
screen.setTranslateY(getHeight() * (zoom-1));
redraw();
}