es.prodevelop.gvsig.mobile.fmap.core
Interface IGeometry

All Superinterfaces:
java.io.Serializable, java.awt.Shape
All Known Subinterfaces:
IGeometry3D
All Known Implementing Classes:
FGeometry, FMultiPoint2D, FMultipoint3D, FNullGeometry

public interface IGeometry
extends java.awt.Shape, java.io.Serializable

Interfaz de Geometría.

Author:
$author$

Field Summary
static int BEST
           
static int E
           
static int N
           
static int NE
           
static int NW
           
static int S
           
static int SE
           
static int SELECTHANDLER
           
static int STRETCHINGHANDLER
           
static int SW
           
static int W
           
 
Method Summary
 IGeometry cloneGeometry()
          Clona la Geometría.
 void draw(java.awt.Graphics2D g, ViewPort vp, FSymbol symbol, java.awt.geom.AffineTransform at)
          Dibuja la geometría sobre el Graphics2D que se pasa como parámetro.
 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.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)
           
 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)
           
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, intersects
 

Field Detail

BEST

public static final int BEST
See Also:
Constant Field Values

N

public static final int N
See Also:
Constant Field Values

NE

public static final int NE
See Also:
Constant Field Values

E

public static final int E
See Also:
Constant Field Values

SE

public static final int SE
See Also:
Constant Field Values

S

public static final int S
See Also:
Constant Field Values

SW

public static final int SW
See Also:
Constant Field Values

W

public static final int W
See Also:
Constant Field Values

NW

public static final int NW
See Also:
Constant Field Values

SELECTHANDLER

public static final int SELECTHANDLER
See Also:
Constant Field Values

STRETCHINGHANDLER

public static final int STRETCHINGHANDLER
See Also:
Constant Field Values
Method Detail

draw

public void draw(java.awt.Graphics2D g,
                 ViewPort vp,
                 FSymbol symbol,
                 java.awt.geom.AffineTransform at)
Dibuja la geometría sobre el Graphics2D que se pasa como parámetro.

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)
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)

Parameters:
g -
vp -
symbol -

getGeometryType

public int getGeometryType()
Obtiene el tipo de la geometría

Returns:
una de las constantes de FShape: POINT, LINE, POLIGON

cloneGeometry

public IGeometry cloneGeometry()
Clona la Geometría.

Returns:
Geometría clonada.

intersects

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

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

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Devuelve el Rectángulo que ocupa la geometría.

Specified by:
getBounds2D in interface java.awt.Shape
Returns:
Rectángulo.

reProject

public void reProject(ICoordTrans ct)
Reproyecta la geometría a partir del transformador de coordenadas.

Parameters:
ct - Coordinate Transformer.

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
Devuelve el GeneralPathXIterator con la información relativa a la geometría.

Specified by:
getPathIterator in interface java.awt.Shape
Parameters:
at - TODO
Returns:
PathIterator.

getHandlers

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

Parameters:
type - Type of handlers
Returns:
Handlers.

transform

public void transform(java.awt.geom.AffineTransform at)

getPathIterator

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

getInternalShape

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

Returns: