01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, Geotools Project Managment Committee (PMC)
05: * (C) 2002, Centre for Computational Geography
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or (at your option) any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * Contacts:
18: * UNITED KINGDOM: James Macgill. j.macgill@geog.leeds.ac.uk
19: */
20:
21: package org.geotools.renderer;
22:
23: import java.awt.Graphics;
24:
25: import org.geotools.feature.FeatureCollection;
26: import org.geotools.styling.Style;
27:
28: import com.vividsolutions.jts.geom.Coordinate;
29: import com.vividsolutions.jts.geom.Envelope;
30:
31: /**
32: * Base interface for renderer. This is very much work in progress.
33: * <strong>Note: this interface will changes in future versions.</strong>
34: *
35: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/render/src/main/java/org/geotools/renderer/Renderer.java $
36: * @version $Id: Renderer.java 20874 2006-08-07 10:00:01Z jgarnett $
37: * @author James Macgill
38: */
39: public interface Renderer {
40:
41: /**
42: * Renders the provided features using the specified style.
43: * The features should fill the viewport but may well extend beyond it.
44: * Features should be cropped (if appropriate) to the specified viewport.
45: *
46: * @param fc The feature collection to render
47: * @param viewport The visible extent to be rendered
48: * @param style The style definition to apply to each feature
49: */
50: void render(FeatureCollection fc, Envelope viewport, Style style);
51:
52: /**
53: * Getter for property interactive.
54: * @return Value of property interactive.
55: */
56: boolean isInteractive();
57:
58: /**
59: * Setter for property interactive.
60: * @param interactive New value of property interactive.
61: */
62: void setInteractive(boolean interactive);
63:
64: /** sets the output graphics for the renderer and the size of the graphic.
65: */
66: void setOutput(Graphics g, java.awt.Rectangle r);
67:
68: public Coordinate pixelToWorld(int x, int y, Envelope map);
69: }
|