List of usage examples for javafx.scene.input ZoomEvent getZoomFactor
public double getZoomFactor()
From source file:net.rptools.tokentool.controller.TokenTool_Controller.java
@FXML void compositeTokenPane_OnZoom(ZoomEvent event) { Double scale = portraitImageView.getScaleY() * event.getZoomFactor(); portraitImageView.setScaleX(scale);//from www . j av a 2 s . c o m portraitImageView.setScaleY(scale); }
From source file:view.EditorView.java
@FXML void scrollPaneOnZoom(ZoomEvent event) { FOKLogger.fine(MainWindow.class.getName(), "Zooming in view, new Zoom level: " + event.getZoomFactor()); drawing.setScaleX(drawing.getScaleX() * event.getZoomFactor()); drawing.setScaleY(drawing.getScaleY() * event.getZoomFactor()); // TODO: Update the actual size in the scrollpane (so that scrollbars appear when zooming in // TODO: Add Keyboard and touchpad zoom // TODO: do the zoom with the right zoom center }