Interface Zoomable


  • public interface Zoomable
    Defines an interface to zoomable objects.
    Author:
    Arnaud BLOUIN
    • Method Detail

      • getZoomIncrement

        double getZoomIncrement()
        Returns:
        The zoom increment used when zooming in/out.
      • getMaxZoom

        double getMaxZoom()
        Returns:
        The maximal level of zooming allowed.
      • getMinZoom

        double getMinZoom()
        Returns:
        The minimal level of zooming allowed.
      • getZoom

        double getZoom()
        Returns:
        The zoom level.
      • setZoom

        void setZoom​(double x,
                     double y,
                     double zoomingLevel)
        Zooms in the zoomable object.
        Parameters:
        zoomingLevel - The zooming level.
        x - The X-coordinate of the location to zoom.
        y - The Y-coordinate of the location to zoom.
      • getZoomedPoint

        Point2D getZoomedPoint​(double x,
                               double y)
        Transforms the given point in a point which coordinates have been modified to take account of the zoom level.
        Parameters:
        x - The X-coordinate of the point to modify.
        y - The Y-coordinate of the point to modify.
        Returns:
        The transformed point.
      • getZoomedPoint

        Point2D getZoomedPoint​(Point pt)
        Transforms the given point in a point which coordinates have been modified to take account of the zoom level.
        Parameters:
        pt - The point to transform.
        Returns:
        The transformed point. Returns (0,0) if the given point is null.