001    /*
002     * SpotFunction
003     * 
004     * Copyright (c) 2002, 2003 Marco Schmidt.
005     * All rights reserved.
006     */
007    
008    package net.sourceforge.jiu.color.dithering;
009    
010    /**
011     * An interface for spot functions to be used for clustered dot dithering.
012     * @author Marco Schmidt
013     * @since 0.9.0
014     * @see ClusteredDotDither
015     */
016    public interface SpotFunction
017    {
018            /**
019             * Compute the spot intensity at the given position.
020             * @param x horizontal position, must be between -1.0 and 1.0 (including both)
021             * @param y vertical position, must be between -1.0 and 1.0 (including both)
022             * @return the function value, must be between 0.0 and 1.0 (including both)
023             */
024            double compute(double x, double y);
025    
026            /**
027             * Returns if this spot function is balanced.
028             */
029            boolean isBalanced();
030    }