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 delegateScaleCalculatorwhose calculation will be inverted.voidsetScaleCalculator(ScaleCalculator scaleCalculator) The delegateScaleCalculatorwhose calculation will be inverted.Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods 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:ScaleCalculatorCalculates a scaling-factor for a source image/entity of particular dimensions.- Specified by:
calculatein 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 delegateScaleCalculatorwhose calculation will be inverted. -
setScaleCalculator
The delegateScaleCalculatorwhose calculation will be inverted.
-