Class Invert
Invert the
ScaleFactor
calculated by the scaleCalculator
delegate.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculate
(Optional<Dimensions> dimensionsToBeScaled, Optional<ImageSizeSuggestion> suggestedSize) Calculates a scaling-factor for a source image/entity of particular dimensions.The delegateScaleCalculator
whose calculation will be inverted.void
setScaleCalculator
(ScaleCalculator scaleCalculator) The delegateScaleCalculator
whose calculation will be inverted.Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Invert
public Invert()
-
-
Method Details
-
calculate
public ScaleFactor calculate(Optional<Dimensions> dimensionsToBeScaled, Optional<ImageSizeSuggestion> suggestedSize) throws OperationFailedException Description copied from class:ScaleCalculator
Calculates a scaling-factor for a source image/entity of particular dimensions.- Specified by:
calculate
in classScaleCalculator
- Parameters:
dimensionsToBeScaled
- dimensions of the source image/entity that will be scaled, if they are known.suggestedSize
- a string suggesting dimensions to resize to or a scaling-factor.- Returns:
- the scaling-factor to use.
- Throws:
OperationFailedException
- if a scale-factor cannot be successfully calculated.
-
getScaleCalculator
The delegateScaleCalculator
whose calculation will be inverted. -
setScaleCalculator
The delegateScaleCalculator
whose calculation will be inverted.
-