mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-10-03 21:55:17 +00:00
Hacked in a somewhat functional zoom for the image editor.
This commit is contained in:
parent
c7c969d2d0
commit
ced78e2a58
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user