Revision 4711 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/Gt2Geometry.java

View differences:

Gt2Geometry.java
2 2
 * Created on 20-sep-2005
3 3
 *
4 4
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 * 
5
 *
6 6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 * 
7
 *
8 8
 * This program is free software; you can redistribute it and/or
9 9
 * modify it under the terms of the GNU General Public License
10 10
 * as published by the Free Software Foundation; either version 2
11 11
 * of the License, or (at your option) any later version.
12
 *  
12
 *
13 13
 * This program is distributed in the hope that it will be useful,
14 14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
 * GNU General Public License for more details.
17
 * 
17
 *
18 18
 * You should have received a copy of the GNU General Public License
19 19
 * along with this program; if not, write to the Free Software
20 20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21
 *  
21
 *
22 22
 * For more information, contact:
23 23
 *
24 24
 *  Generalitat Valenciana
......
30 30
 *      +34 963862235
31 31
 *   gvsig@gva.es
32 32
 *      www.gvsig.gva.es
33
 * 
33
 *
34 34
 *    or
35
 * 
35
 *
36 36
 *   IVER T.I. S.A
37 37
 *   Salamanca 50
38 38
 *   46005 Valencia
39 39
 *   Spain
40
 * 
40
 *
41 41
 *   +34 963163400
42 42
 *   dac@iver.es
43 43
 */
......
76 76
     */
77 77
    public class Gt2Geometry implements IGeometry {
78 78
        private FLiteShape shp;
79
        
80 79

  
81 80

  
81

  
82 82
        /**
83 83
         * Crea un nuevo FGeometry.
84 84
         *
......
93 93
         */
94 94
        public void draw(Graphics2D g, ViewPort vp, FStyle2D symbol) {
95 95
            // OJO CON LA PRECISION. DEBERIAMOS USAR: ((GeneralPathX) shp.m_Polyline).transform(mT);
96
            // O HACER UNA FUNCION DE TRANSFORMACI?N QUE USE LOS DOUBLES DEL 
96
            // O HACER UNA FUNCION DE TRANSFORMACI?N QUE USE LOS DOUBLES DEL
97 97
            // SHAPE
98 98
            // Shape shpTrans = vp.getAffineTransform().createTransformedShape(shp);
99 99
            transform(vp.getAffineTransform());
......
129 129
         */
130 130
        public void draw(Graphics2D g, ViewPort vp, FSymbol symbol) {
131 131
            // OJO CON LA PRECISION. DEBERIAMOS USAR: ((GeneralPathX) shp.m_Polyline).transform(mT);
132
            // O HACER UNA FUNCION DE TRANSFORMACI?N QUE USE LOS DOUBLES DEL 
132
            // O HACER UNA FUNCION DE TRANSFORMACI?N QUE USE LOS DOUBLES DEL
133 133
            // SHAPE
134 134
            // Shape shpTrans = vp.getAffineTransform().createTransformedShape(shp);
135 135
            transform(vp.getAffineTransform());
......
216 216
         * @see com.iver.cit.gvsig.fmap.core.IGeometry#drawInts(java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort, com.iver.cit.gvsig.fmap.core.v02.FSymbol)
217 217
         */
218 218
        public void drawInts(Graphics2D g, ViewPort vp, FSymbol symbol) {
219
            draw(g, vp, symbol);            
219
            draw(g, vp, symbol);
220 220
        }
221 221

  
222 222
        /* (non-Javadoc)
......
233 233
			return shp.getStretchingHandlers();
234 234

  
235 235
		}
236

  
237
		public boolean contains(IGeometry g) {
238
			Geometry geometry=toJTSGeometry();
239
			return geometry.contains(g.toJTSGeometry());
240
		}
241

  
242
		public boolean intersects(IGeometry geom) {
243
			Geometry geometry=toJTSGeometry();
244
			return geometry.intersects(geom.toJTSGeometry());
245
		}
236 246
    }
237 247

  
238 248

  

Also available in: Unified diff