/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *    (C) 2002-2006, Geotools Project Managment Committee (PMC)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation; either
 *    version 2.1 of the License, or (at your option) any later version.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.renderer;

// J2SE dependencies
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.AffineTransform;


/**
 * Renderer draws a map on behalf on <code>MapPane</code>.  It determines what features to draw,
 * bounding box, size, and style from the {@linkplain org.geotools.map.Context context}.
 *
 * @author Cameron Shorter
 * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/render/src/main/java/org/geotools/renderer/Renderer2D.java $
 * @version $Id: Renderer2D.java 20874 2006-08-07 10:00:01Z jgarnett $
 *
 * @task REVISIT Renderer2D should extend Renderer once Renderer has been
 *       cleaned up.
 */
public interface Renderer2D {
    /**
     * Render features based on the {@link org.geotools.map.LayerList},
     * bounding box and {@link org.geotools.styling.Style} specified in 
     * the {@linkplain org.geotools.map.Context context}.
     *
     * @param graphics The graphics handler to draw to.
     * @param paintArea The bounds of the output area in output units (usually pixels).
     *        The upper left corner is (0,0) in most cases. However, a different value
     *        is allowed if some widget area must be preserved, for example a margin on
     *        the left and top size for painting a graduation.
     * @param transform A transform which converts "World coordinates" to output
     *        coordinates.
     *        This transform will be concatenated to the <code>graphics</code> transform (as of
     *     <code>graphics.{@link Graphics2D#transform(AffineTransform) transform}(transform)</code>)
     *        before the rendering take place.
     */
    public void paint(Graphics2D graphics, Rectangle paintArea, AffineTransform transform);
}
