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 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 associatedExtent
each 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 associatedExtent
each to match.The state of each
ExtentToArrange
is changed to assign a new scaled size to match.- Parameters:
partitions
- theExtent
s 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.
-