com.iver.cit.gvsig.fmap.core
Class FPoint2D

java.lang.Object
  extended bycom.iver.cit.gvsig.fmap.core.FPoint2D
All Implemented Interfaces:
FShape, java.awt.Shape
Direct Known Subclasses:
FPoint3D

public class FPoint2D
extends java.lang.Object
implements FShape

Punto 2D.

Author:
Vicente Caballero Navarro

Field Summary
protected  java.awt.geom.Point2D p
           
 
Fields inherited from interface com.iver.cit.gvsig.fmap.core.FShape
LINE, MULTI, NULL, POINT, POLYGON, TEXT
 
Constructor Summary
FPoint2D(double x, double y)
          Crea un nuevo Point2D.
 
Method Summary
 FShape cloneFShape()
          Clona FShape.
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
 boolean contains(java.awt.geom.Point2D p)
           
 boolean contains(java.awt.geom.Rectangle2D r)
           
 java.awt.Rectangle getBounds()
           
 java.awt.geom.Rectangle2D getBounds2D()
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
           
 int getShapeType()
          Obtiene el tipo de shape que contiene.
 double getX()
          Devuelve la coordenada x del punto.
 double getY()
          Devuelve la coordenada y del punto.
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(java.awt.geom.Rectangle2D r)
           
 void reProject(ICoordTrans ct)
          Reprojecta el FShape.
 void transform(java.awt.geom.AffineTransform at)
          Aplica la transformación de la matriz de transformación que se pasa como parámetro.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

protected java.awt.geom.Point2D p
Constructor Detail

FPoint2D

public FPoint2D(double x,
                double y)
Crea un nuevo Point2D.

Parameters:
x - Coordenada x del punto.
y - Coordenada y del punto.
Method Detail

transform

public void transform(java.awt.geom.AffineTransform at)
Aplica la transformación de la matriz de transformación que se pasa como parámetro.

Parameters:
at - Matriz de transformación.

contains

public boolean contains(double x,
                        double y)
Specified by:
contains in interface java.awt.Shape

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Specified by:
contains in interface java.awt.Shape

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Specified by:
intersects in interface java.awt.Shape

getBounds

public java.awt.Rectangle getBounds()
Specified by:
getBounds in interface java.awt.Shape

getX

public double getX()
Devuelve la coordenada x del punto.

Returns:
Coordenada x.

getY

public double getY()
Devuelve la coordenada y del punto.

Returns:
Coordenada y.

contains

public boolean contains(java.awt.geom.Point2D p)
Specified by:
contains in interface java.awt.Shape

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Specified by:
getBounds2D in interface java.awt.Shape

contains

public boolean contains(java.awt.geom.Rectangle2D r)
Specified by:
contains in interface java.awt.Shape

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Specified by:
intersects in interface java.awt.Shape

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
Specified by:
getPathIterator in interface java.awt.Shape

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
                                                  double flatness)
Specified by:
getPathIterator in interface java.awt.Shape

getShapeType

public int getShapeType()
Description copied from interface: FShape
Obtiene el tipo de shape que contiene. Puede ser una de las constantes POINT, LINE o POLYGON

Specified by:
getShapeType in interface FShape
Returns:
int
See Also:
FShape.getShapeType()

cloneFShape

public FShape cloneFShape()
Description copied from interface: FShape
Clona FShape.

Specified by:
cloneFShape in interface FShape
Returns:
FShape clonado.

reProject

public void reProject(ICoordTrans ct)
Description copied from interface: FShape
Reprojecta el FShape.

Specified by:
reProject in interface FShape
Parameters:
ct - Coordenadas de transformación.