Interface Position

    • Method Detail

      • calculateX

        int calculateX​(int sourceWidth,
                       int sourceHeight,
                       int targetWidth,
                       int targetHeight)
        Returns the x coordinate for where a target should be placed inside the source.
      • calculateY

        int calculateY​(int sourceWidth,
                       int sourceHeight,
                       int targetWidth,
                       int targetHeight)
        Returns the y coordinate for where an image should be placed inside the canvas.
      • calculateXY

        default Dimension calculateXY​(int sourceWidth,
                                      int sourceHeight,
                                      int targetWidth,
                                      int targetHeight)