Class DiamondSpotFunction
- java.lang.Object
-
- net.sourceforge.jiu.color.dithering.DiamondSpotFunction
-
- All Implemented Interfaces:
SpotFunction
public class DiamondSpotFunction extends Object implements SpotFunction
A diamond spot function.- Since:
- 0.9.0
- Author:
- Marco Schmidt
- See Also:
ClusteredDotDither
-
-
Constructor Summary
Constructors Constructor Description DiamondSpotFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecompute(double x, double y)Compute the spot intensity at the given position.booleanisBalanced()Returns if this spot function is balanced.
-
-
-
Method Detail
-
compute
public double compute(double x, double y)Description copied from interface:SpotFunctionCompute the spot intensity at the given position.- Specified by:
computein interfaceSpotFunction- Parameters:
x- horizontal position, must be between -1.0 and 1.0 (including both)y- vertical position, must be between -1.0 and 1.0 (including both)- Returns:
- the function value, must be between 0.0 and 1.0 (including both)
-
isBalanced
public boolean isBalanced()
Description copied from interface:SpotFunctionReturns if this spot function is balanced.- Specified by:
isBalancedin interfaceSpotFunction
-
-