Class Sharpen
java.lang.Object
is.galia.operation.Sharpen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfreeze()Makes the instance unmodifiable.doublebooleanSimpler but less-accurate counterpart ofOperation.hasEffect(Size, OperationList).booleanhasEffect(Size fullSize, OperationList opList) Context-aware counterpart toOperation.hasEffect().voidsetAmount(double amount) toMap(Size fullSize, ScaleConstraint scaleConstraint) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface is.galia.operation.Operation
getResultingSize, validate
-
Constructor Details
-
Sharpen
public Sharpen()No-op constructor. -
Sharpen
public Sharpen(double amount) - Parameters:
amount- Amount to sharpen.
-
-
Method Details
-
freeze
public void freeze()Description copied from interface:OperationMakes the instance unmodifiable. When frozen, mutation methods should throw anIllegalStateExceptionand getters should return immutable values, if possible. (But they should do that anyway.) -
hasEffect
public boolean hasEffect()Description copied from interface:OperationSimpler but less-accurate counterpart ofOperation.hasEffect(Size, OperationList). -
hasEffect
Description copied from interface:OperationContext-aware counterpart toOperation.hasEffect(). For example, a scale operation specifying a scale to 300×200, when the given operation list contains a crop of 300×200, would returnfalse.- Specified by:
hasEffectin interfaceOperation- Parameters:
fullSize- Full size of the source image.opList- Operation list of which the operation may or may not be a member.- Returns:
- Whether applying the operation in the context of the given full size and operation list would result in a changed image.
-
getAmount
public double getAmount() -
setAmount
- Parameters:
amount- Amount to sharpen.- Throws:
IllegalArgumentException- if the supplied amount is less than zero.IllegalStateException- if the instance is frozen.
-
toMap
-
toString
-