Class FitCombinedScaler

Object
FitCombinedScaler

public class FitCombinedScaler extends Object
Scales the size of images to match the target image, preserving aspect-ratio.
Author:
Owen Feehan
  • Method Details

    • scaleToWidth

      public static Extent scaleToWidth(List<List<ExtentToArrange>> partitions, boolean permitPartialFinalRow, int width)
      Calculates the size of the combined image to use for the montage, and scales the associated Extent each to match.

      The state of each ExtentToArrange is changed to assign a new scaled size to match.

      Parameters:
      partitions - the Extents partitioned into rows.
      permitPartialFinalRow - allows the final row to only be partially filled, so as to keep its height similar to other rows.
      width - the desired width of the combiend image.
      Returns:
      the size of the combined image, containing all rows and columns.