001    /*--------------------------------------------------------------------------+
002    $Id: IDrawingPattern.java 26931 2010-03-17 14:53:13Z besenreu $
003    |                                                                          |
004    | Copyright 2005-2010 Technische Universitaet Muenchen                     |
005    |                                                                          |
006    | Licensed under the Apache License, Version 2.0 (the "License");          |
007    | you may not use this file except in compliance with the License.         |
008    | You may obtain a copy of the License at                                  |
009    |                                                                          |
010    |    http://www.apache.org/licenses/LICENSE-2.0                            |
011    |                                                                          |
012    | Unless required by applicable law or agreed to in writing, software      |
013    | distributed under the License is distributed on an "AS IS" BASIS,        |
014    | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
015    | See the License for the specific language governing permissions and      |
016    | limitations under the License.                                           |
017    +--------------------------------------------------------------------------*/
018    package edu.tum.cs.commons.treemap;
019    
020    /**
021     * A drawing pattern is a predicate that determines whether a given pixel
022     * belongs to the foreground or background. This way image generating processors
023     * can produce e.g. striped areas.
024     * 
025     * @author Benjamin Hummel
026     * @author $Author: besenreu $
027     * @version $Rev: 26931 $
028     * @levd.rating GREEN Hash: 492D98E7AC89E5A2194F2280F30485D3
029     */
030    public interface IDrawingPattern {
031    
032            /**
033             * For the given x and y coordinates returns whether the pixel belongs to
034             * the foreground (otherwise it is background as we do not support
035             * transparency). The coordinates are in pixels using the standard
036             * coordinate system for 2D graphics where (0,0) is the top left corner.
037             */
038            boolean isForeground(int x, int y);
039    }