Package bdv

Class TransformEventHandler2D

    • Constructor Detail

      • TransformEventHandler2D

        public TransformEventHandler2D​(TransformState transform)
    • Method Detail

      • setCanvasSize

        public void setCanvasSize​(int width,
                                  int height,
                                  boolean updateTransform)
        Description copied from interface: TransformEventHandler
        This is called, when the screen size of the canvas (the component displaying the image and generating mouse events) changes. This can be used to determine screen coordinates to keep fixed while zooming or rotating with the keyboard, e.g., set these to (width/2, height/2). It can also be used to update the current source-to-screen transform, e.g., to change the zoom along with the canvas size.
        Specified by:
        setCanvasSize in interface TransformEventHandler
        Parameters:
        width - the new canvas width.
        height - the new canvas height.
        updateTransform - whether the current source-to-screen transform should be updated. This will be false for the initial update of a new TransformEventHandler and true on subsequent calls.