es.prodevelop.gvsig.mobile.fmap.core
Class FGeometry

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.core.FGeometry
All Implemented Interfaces:
IGeometry, IGeometry3D, java.io.Serializable, java.awt.Shape

public class FGeometry
extends java.lang.Object
implements IGeometry3D

Geometría.

Author:
FJP
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface es.prodevelop.gvsig.mobile.fmap.core.IGeometry
BEST, E, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W
 
Method Summary
 IGeometry cloneGeometry()
          Clona la Geometría.
 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)
           
 void draw(java.awt.Graphics2D g, ViewPort vp, FSymbol symbol, java.awt.geom.AffineTransform at)
          Dibuja la geometria actual en el graphics que se le pasa como parámetro, aplicandole las características del símbolo.
 void drawInts(java.awt.Graphics2D g, ViewPort vp, FSymbol symbol, java.awt.geom.AffineTransform at)
          You can use this function if you are going to draw into a bitmap.
 java.awt.Rectangle getBounds()
           
 java.awt.geom.Rectangle2D getBounds2D()
          Devuelve el Rectángulo que ocupa la geometría.
 int getGeometryType()
          Obtiene el tipo de la geometría
 Handler[] getHandlers(int type)
          It returns the handlers of the geomety, these they can be of two types is straightening and of seleccion.
 java.awt.Shape getInternalShape()
          Useful to have the real shape behind the scenes.
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
          Devuelve el GeneralPathXIterator con la información relativa a la geometría.
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
           
 double[] getZs()
          Devuelve un array con todos los valores de Z.
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(java.awt.geom.Rectangle2D r)
          Devuelve true si la geometría intersecta con el rectángulo que se pasa como parámetro.
 void reProject(ICoordTrans ct)
          Reproyecta la geometría a partir del transformador de coordenadas.
 void transform(java.awt.geom.AffineTransform at)
          Aplica la transformación a la geometría de la matriz de transformación que se pasa como parámetro.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

draw

public void draw(java.awt.Graphics2D g,
                 ViewPort vp,
                 FSymbol symbol,
                 java.awt.geom.AffineTransform at)
Dibuja la geometria actual en el graphics que se le pasa como parámetro, aplicandole las características del símbolo.

Specified by:
draw in interface IGeometry
Parameters:
g - Graphics2D.
vp - ViewPort.
symbol - Símbolo.

drawInts

public void drawInts(java.awt.Graphics2D g,
                     ViewPort vp,
                     FSymbol symbol,
                     java.awt.geom.AffineTransform at)
Description copied from interface: IGeometry
You can use this function if you are going to draw into a bitmap. (With ints coords). It will do a decimation, drawing a shape with less coords (faster draw)

Specified by:
drawInts in interface IGeometry
Parameters:
g -
vp -
symbol -

transform

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

Specified by:
transform in interface IGeometry
Parameters:
at - Matriz de transformación.

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Description copied from interface: IGeometry
Devuelve true si la geometría intersecta con el rectángulo que se pasa como parámetro.

Specified by:
intersects in interface IGeometry
Parameters:
r - Rectángulo.
Returns:
True, si intersecta.

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Description copied from interface: IGeometry
Devuelve el Rectángulo que ocupa la geometría.

Specified by:
getBounds2D in interface IGeometry
Returns:
Rectángulo.

getGeometryType

public int getGeometryType()
Description copied from interface: IGeometry
Obtiene el tipo de la geometría

Specified by:
getGeometryType in interface IGeometry
Returns:
una de las constantes de FShape: POINT, LINE, POLIGON
See Also:
com.iver.cit.gvsig.fmap.core.IGeometry#getGeometryType()

cloneGeometry

public IGeometry cloneGeometry()
Description copied from interface: IGeometry
Clona la Geometría.

Specified by:
cloneGeometry in interface IGeometry
Returns:
Geometría clonada.

reProject

public void reProject(ICoordTrans ct)
Description copied from interface: IGeometry
Reproyecta la geometría a partir del transformador de coordenadas.

Specified by:
reProject in interface IGeometry
Parameters:
ct - Coordinate Transformer.

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
Description copied from interface: IGeometry
Devuelve el GeneralPathXIterator con la información relativa a la geometría.

Specified by:
getPathIterator in interface IGeometry
Parameters:
at - TODO
Returns:
PathIterator.
See Also:
com.iver.cit.gvsig.fmap.core.IGeometry#getPathIterator(AffineTransform)

getZs

public double[] getZs()
Devuelve un array con todos los valores de Z.

Specified by:
getZs in interface IGeometry3D
Returns:
Array de Zs.

getHandlers

public Handler[] getHandlers(int type)
Description copied from interface: IGeometry
It returns the handlers of the geomety, these they can be of two types is straightening and of seleccion.

Specified by:
getHandlers in interface IGeometry
Parameters:
type - Type of handlers
Returns:
Handlers.
See Also:
com.iver.cit.gvsig.fmap.core.IGeometry#getHandlers()

getPathIterator

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

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

contains

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

getInternalShape

public java.awt.Shape getInternalShape()
Description copied from interface: IGeometry
Useful to have the real shape behind the scenes. May be uses to edit it knowing it it is a Circle, Ellipse, etc

Specified by:
getInternalShape in interface IGeometry
Returns: