Class Sharpen
java.lang.Object
is.galia.operation.Sharpen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
freeze()
Makes the instance unmodifiable.double
boolean
Simpler but less-accurate counterpart ofOperation.hasEffect(Size, OperationList)
.boolean
hasEffect
(Size fullSize, OperationList opList) Context-aware counterpart toOperation.hasEffect()
.void
setAmount
(double amount) toMap
(Size fullSize, ScaleConstraint scaleConstraint) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:Operation
Makes the instance unmodifiable. When frozen, mutation methods should throw anIllegalStateException
and getters should return immutable values, if possible. (But they should do that anyway.) -
hasEffect
public boolean hasEffect()Description copied from interface:Operation
Simpler but less-accurate counterpart ofOperation.hasEffect(Size, OperationList)
. -
hasEffect
Description copied from interface:Operation
Context-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:
hasEffect
in 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
-