Revision 2183 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FPoint2D.java

View differences:

FPoint2D.java
42 42

  
43 43
import org.cresques.cts.ICoordTrans;
44 44

  
45
import com.iver.utiles.XMLEntity;
46

  
45 47
import java.awt.Rectangle;
46 48
import java.awt.geom.AffineTransform;
47 49
import java.awt.geom.PathIterator;
48 50
import java.awt.geom.Point2D;
49 51
import java.awt.geom.Rectangle2D;
52
import java.util.ArrayList;
50 53

  
51 54

  
52 55
/**
......
66 69
	public FPoint2D(double x, double y) {
67 70
		p = new Point2D.Double(x, y);
68 71
	}
69

  
72
	public FPoint2D(){
73
		
74
	}
75
	private void setPoint(double x, double y){
76
		p = new Point2D.Double(x, y);
77
	}
70 78
	/**
71 79
	 * Aplica la transformaci?n de la matriz de transformaci?n que se pasa como
72 80
	 * par?metro.
......
140 148
	 * @see java.awt.Shape#getBounds2D()
141 149
	 */
142 150
	public Rectangle2D getBounds2D() {
143
		return new Rectangle2D.Double(p.getX(), p.getY(), 0, 0);
151
		return new Rectangle2D.Double(p.getX()- 0.01, p.getY() - 0.01, 0.02, 0.02);
144 152
	}
145 153

  
146 154
	/* (non-Javadoc)
......
191 199
	public void reProject(ICoordTrans ct) {
192 200
		p = ct.convert(p, p);
193 201
	}
202

  
203
	/**
204
	 * @see com.iver.cit.gvsig.fmap.core.FShape#getXMLEntity()
205
	 */
206
	public XMLEntity getXMLEntity() {
207
		XMLEntity xml=new XMLEntity();
208
		xml.putProperty("x",p.getX());
209
		xml.putProperty("y",p.getY());
210
		return xml;
211
	}
212
	public void setXMLEntity(XMLEntity xml){
213
		this.setPoint(xml.getDoubleProperty("x"),xml.getDoubleProperty("y"));//p=new FPoint2D(xml.getDoubleProperty("x"),xml.getDoubleProperty("y"));
214
	}
194 215
}

Also available in: Unified diff