01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, Geotools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.renderer;
17:
18: // J2SE dependencies
19: import java.awt.Graphics2D;
20: import java.awt.Rectangle;
21: import java.awt.geom.AffineTransform;
22:
23: /**
24: * Renderer draws a map on behalf on <code>MapPane</code>. It determines what features to draw,
25: * bounding box, size, and style from the {@linkplain org.geotools.map.Context context}.
26: *
27: * @author Cameron Shorter
28: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/render/src/main/java/org/geotools/renderer/Renderer2D.java $
29: * @version $Id: Renderer2D.java 20874 2006-08-07 10:00:01Z jgarnett $
30: *
31: * @task REVISIT Renderer2D should extend Renderer once Renderer has been
32: * cleaned up.
33: */
34: public interface Renderer2D {
35: /**
36: * Render features based on the {@link org.geotools.map.LayerList},
37: * bounding box and {@link org.geotools.styling.Style} specified in
38: * the {@linkplain org.geotools.map.Context context}.
39: *
40: * @param graphics The graphics handler to draw to.
41: * @param paintArea The bounds of the output area in output units (usually pixels).
42: * The upper left corner is (0,0) in most cases. However, a different value
43: * is allowed if some widget area must be preserved, for example a margin on
44: * the left and top size for painting a graduation.
45: * @param transform A transform which converts "World coordinates" to output
46: * coordinates.
47: * This transform will be concatenated to the <code>graphics</code> transform (as of
48: * <code>graphics.{@link Graphics2D#transform(AffineTransform) transform}(transform)</code>)
49: * before the rendering take place.
50: */
51: public void paint(Graphics2D graphics, Rectangle paintArea,
52: AffineTransform transform);
53: }
|