Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / core / Polygon2D.java @ 240

History | View | Annotate | Download (3.08 KB)

1
package com.iver.cit.gvsig.fmap.core;
2

    
3
import org.geotools.geometry.Geometry;
4

    
5
import org.geotools.renderer.style.Style2D;
6

    
7
import com.iver.cit.gvsig.fmap.ViewPort;
8

    
9
import java.awt.Color;
10
import java.awt.Graphics2D;
11
import java.awt.Rectangle;
12
import java.awt.geom.AffineTransform;
13
import java.awt.geom.PathIterator;
14
import java.awt.geom.Point2D;
15
import java.awt.geom.Rectangle2D;
16

    
17

    
18
/**
19
 * Pol?gono 2D.
20
 *
21
 * @author Vicente Caballero Navarro
22
 * 
23
 */
24
public class Polygon2D implements FGeometry {
25
    private GeneralPathX gp;
26

    
27
    /**
28
     * Crea un nuevo Polygon2D.
29
     *
30
     * @param gpx DOCUMENT ME!
31
     */
32
    public Polygon2D(GeneralPathX gpx) {
33
        gp = gpx;
34
    }
35

    
36
    /**
37
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#draw(java.awt.Graphics2D,
38
     *      ViewPort, org.geotools.renderer.style.Style2D)
39
     */
40
    public void draw(Graphics2D g, ViewPort vp, Style2D symbol) {
41
            gp.transform(vp.getAffineTransform());
42
                
43
                g.setPaint(Color.red);
44
                g.fill(gp);
45
                g.setPaint(Color.black);
46
                g.draw(gp);
47
    }
48

    
49

    
50
    /**
51
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
52
     */
53
    public int getType() {
54
        return 0;
55
    }
56

    
57
    /**
58
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
59
     */
60
    public Geometry toJTSGeometry() {
61
        return null;
62
    }
63

    
64
    /**
65
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#createLabels(int, boolean)
66
     */
67
    public FGeometry[] createLabels(int position, boolean duplicates) {
68
        return null;
69
    }
70

    
71
    /**
72
     * @see java.awt.Shape#contains(double, double)
73
     */
74
    public boolean contains(double arg0, double arg1) {
75
        return false;
76
    }
77

    
78
    /**
79
     * @see java.awt.Shape#contains(double, double, double, double)
80
     */
81
    public boolean contains(double arg0, double arg1, double arg2, double arg3) {
82
        return false;
83
    }
84

    
85
    /**
86
     * @see java.awt.Shape#intersects(double, double, double, double)
87
     */
88
    public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
89
        return false;
90
    }
91

    
92
    /**
93
     * @see java.awt.Shape#getBounds()
94
     */
95
    public Rectangle getBounds() {
96
        return null;
97
    }
98

    
99
    /**
100
     * @see java.awt.Shape#contains(java.awt.geom.Point2D)
101
     */
102
    public boolean contains(Point2D arg0) {
103
        return false;
104
    }
105

    
106
    /**
107
     * @see java.awt.Shape#getBounds2D()
108
     */
109
    public Rectangle2D getBounds2D() {
110
        return null;
111
    }
112

    
113
    /**
114
     * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
115
     */
116
    public boolean contains(Rectangle2D arg0) {
117
        return false;
118
    }
119

    
120
    /**
121
     * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
122
     */
123
    public boolean intersects(Rectangle2D arg0) {
124
        return false;
125
    }
126

    
127
    /**
128
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
129
     */
130
    public PathIterator getPathIterator(AffineTransform arg0) {
131
        return null;
132
    }
133

    
134
    /**
135
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform,
136
     *      double)
137
     */
138
    public PathIterator getPathIterator(AffineTransform arg0, double arg1) {
139
        return null;
140
    }
141
}