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

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

public class FPolyline2D
extends java.lang.Object
implements FShape

DOCUMENT ME!

Author:
Fernando González Cortés

Field Summary
protected  GeneralPathX gp
           
 
Fields inherited from interface com.iver.cit.gvsig.fmap.core.FShape
LINE, MULTI, NULL, POINT, POLYGON, TEXT
 
Constructor Summary
FPolyline2D(GeneralPathX gpx)
          Crea un nuevo FPolyline2D.
 
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.
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(java.awt.geom.Rectangle2D r)
          El método intersects de java.awt.Shape que define la intersección entre una polilínea y un Rectangle2D considera la polilínea como un Shape genérico y se producen errores en la selección de polilíneas.
 void reProject(ICoordTrans ct)
          Reprojecta el FShape.
 void transform(java.awt.geom.AffineTransform at)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gp

protected GeneralPathX gp
Constructor Detail

FPolyline2D

public FPolyline2D(GeneralPathX gpx)
Crea un nuevo FPolyline2D.

Parameters:
gpx - GeneralPathX.
Method Detail

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

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)
El método intersects de java.awt.Shape que define la intersección entre una polilínea y un Rectangle2D considera la polilínea como un Shape genérico y se producen errores en la selección de polilíneas. Por este motivo se ha modificado este método intersect() de FPolyline2D para que realize la intersección estricta entre el Rectangle2D y la polilínea en cuestión. El precio es un incremento de tiempo máximo del 50%.

Specified by:
intersects in interface java.awt.Shape
Parameters:
r - Rectángulo.
Returns:
True si intersecta con el rectangulo que se pasa como parámetro.

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

transform

public void transform(java.awt.geom.AffineTransform at)
DOCUMENT ME!

Parameters:
at - DOCUMENT ME!

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.