Class FitCombinedScaler
Object
FitCombinedScaler
Scales the size of images to match the target image, preserving aspect-ratio.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtentscaleToWidth(List<List<ExtentToArrange>> partitions, boolean permitPartialFinalRow, int width) Calculates the size of the combined image to use for the montage, and scales the associatedExtenteach to match.
-
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 associatedExtenteach to match.The state of each
ExtentToArrangeis changed to assign a new scaled size to match.- Parameters:
partitions- theExtents 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.
-