01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-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: * Created on 19-ott-2003
17: */
18: package org.geotools.renderer.style;
19:
20: import java.awt.image.BufferedImage;
21:
22: /**
23: * A style class used to depict a point, polygon centroid or line with a small graphic icon
24: *
25: * @author Andrea Aime
26: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/render/src/main/java/org/geotools/renderer/style/GraphicStyle2D.java $
27: * @version $Id: GraphicStyle2D.java 22266 2006-10-19 11:30:55Z acuster $
28: */
29: public class GraphicStyle2D extends Style2D {
30: BufferedImage image;
31: float rotation;
32: float opacity;
33:
34: /**
35: * Creates a new GraphicStyle2D object.
36: *
37: * @param image The image that will be used to depict the centroid/point/...
38: * @param rotation The image rotation
39: * @param opacity The image opacity
40: */
41: public GraphicStyle2D(BufferedImage image, float rotation,
42: float opacity) {
43: this .image = image;
44: this .rotation = rotation;
45: this .opacity = opacity;
46: }
47:
48: /**
49: */
50: public BufferedImage getImage() {
51: return image;
52: }
53:
54: /**
55: */
56: public float getOpacity() {
57: return opacity;
58: }
59:
60: /**
61: */
62: public float getRotation() {
63: return rotation;
64: }
65:
66: /**
67: * @param image
68: */
69: public void setImage(BufferedImage image) {
70: this .image = image;
71: }
72:
73: /**
74: * @param f
75: */
76: public void setOpacity(float f) {
77: opacity = f;
78: }
79:
80: /**
81: * @param f
82: */
83: public void setRotation(float f) {
84: rotation = f;
85: }
86: }
|