private float recalculateMagnifyFactor( Rectangle containerBounds, int imageWidth ) {
        double width = containerBounds.getWidth();
        return Math.min( DEFAULT_MAGNIFY_FACTOR, ((float) (width / imageWidth)) * 1.25f );
    }
Allows clients to add a callback mechanism for timing events
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ZoomImageRunner.java