/* @(#)PaintAlgorithm.java 1.0   2.3.2   11 September 2004
 *
 * Copyright 2004
 * College of Computer and Information Science
 * Northeastern University
 * Boston, MA  02115
 *
 * The Java Power Tools software may be used for educational
 * purposes as long as this copyright notice is retained intact
 * at the top of all source files.
 *
 * To discuss possible commercial use of this software, 
 * contact Richard Rasala at Northeastern University, 
 * College of Computer and Information Science,
 * 617-373-2462 or rasala@ccs.neu.edu.
 *
 * The Java Power Tools software has been designed and built
 * in collaboration with Viera Proulx and Jeff Raab.
 *
 * Should this software be modified, the words "Modified from 
 * Original" must be included as a comment below this notice.
 *
 * All publication rights are retained.  This software or its 
 * documentation may not be published in any media either
 * in whole or in part without explicit permission.
 *
 * This software was created with support from Northeastern 
 * University and from NSF grant DUE-9950829.
 */

package edu.neu.ccs.gui;

import java.awt.*;

/**
 * <p>The interface <code>PaintAlgorithm</code> specifies an algorithm
 * that may be used to define a <code>TexturePaint</code> object; this
 * algorithm should return a <code>Color</code> for each x,y pixel
 * position; this algorithm should be periodic in both the x and y
 * directions.</p>
 * 
 * @author  Richard Rasala
 * @version 2.3.2
 * @since   2.3.2
 */
public interface PaintAlgorithm {

    /**
     * <p>Returns the <code>Color</code> at pixel position
     * <code>(x, y)</code>.</p>
     *
     * <p>This function should be periodic
     * in both the x and y directions with
     * period <code>xPeriod()</code> in x and
     * period <code>yPeriod()</code> in y.</p>
     */
    Color color(int x, int y);
    
    /** The x-period which should be positive. */
    int xPeriod();
    
    /** The y-period which should be positive. */
    int yPeriod();
}

