org.gvsig.fmap.mapcontrol.impl
Class MapControlDrawer2D

java.lang.Object
  extended by org.gvsig.fmap.mapcontrol.impl.DefaultPrimitivesDrawer
      extended by org.gvsig.fmap.mapcontrol.impl.MapControlDrawer2D
All Implemented Interfaces:
MapControlDrawer, PrimitivesDrawer

public class MapControlDrawer2D
extends DefaultPrimitivesDrawer
implements MapControlDrawer

MapControlDrawer for a 2D view.

Author:
Jorge Piera

Field Summary
protected  org.gvsig.fmap.geom.GeometryManager geomManager
           
 
Fields inherited from class org.gvsig.fmap.mapcontrol.impl.DefaultPrimitivesDrawer
color, graphics, xorColor
 
Constructor Summary
MapControlDrawer2D()
           
 
Method Summary
 void draw(org.gvsig.fmap.geom.Geometry geometry)
          It draws a Geometry on the map using the color specified using the PrimitivesDrawer.setColor(Color) method.
 void draw(org.gvsig.fmap.geom.Geometry geometry, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
          It draws a Geometry on the map using a concrete symbol.
 void drawHandler(org.gvsig.fmap.geom.handler.Handler handler, java.awt.geom.AffineTransform at)
          It draws a Handler on the map.
 void drawHandlers(org.gvsig.fmap.geom.handler.Handler[] handlers, java.awt.geom.AffineTransform at, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
          It draws the Handler's that compose a geometry on the map.
 void drawImage(java.awt.Image img, java.awt.geom.AffineTransform xform)
          It draws image, applying a transform from image space into user space before drawing.
 void drawImage(java.awt.Image img, int x, int y)
          It draws an image on a map in a concrete position.
 void drawLine(java.awt.geom.Point2D firstPoint, java.awt.geom.Point2D endPoint, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
          It draws a line using a concrete symbol.
 void setComposite(java.awt.Composite composite)
           
 void setViewPort(org.gvsig.fmap.mapcontext.ViewPort viewPort)
          The ViewPort is used to transform the map coordinates in the screen coordinates.
 void transform(java.awt.geom.AffineTransform at)
           
 
Methods inherited from class org.gvsig.fmap.mapcontrol.impl.DefaultPrimitivesDrawer
cleanCanvas, drawLine, drawOval, drawRect, fillRect, setColor, setGraphics, setRenderingHints, setStroke, startDrawing, stopDrawing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gvsig.fmap.mapcontrol.MapControlDrawer
cleanCanvas, setRenderingHints, setStroke
 
Methods inherited from interface org.gvsig.fmap.mapcontrol.PrimitivesDrawer
drawLine, drawOval, drawRect, fillRect, setColor, setGraphics, startDrawing, stopDrawing
 

Field Detail

geomManager

protected org.gvsig.fmap.geom.GeometryManager geomManager
Constructor Detail

MapControlDrawer2D

public MapControlDrawer2D()
Parameters:
graphics -
viewPort -
Method Detail

draw

public void draw(org.gvsig.fmap.geom.Geometry geometry)
Description copied from interface: MapControlDrawer
It draws a Geometry on the map using the color specified using the PrimitivesDrawer.setColor(Color) method.

Specified by:
draw in interface MapControlDrawer
Parameters:
geometry - The Geometry to draw.

draw

public void draw(org.gvsig.fmap.geom.Geometry geometry,
                 org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
Description copied from interface: MapControlDrawer
It draws a Geometry on the map using a concrete symbol.

Specified by:
draw in interface MapControlDrawer
Parameters:
geometry - The Geometry to draw.
symbol - The symbol used to draw the geometry.

drawHandler

public void drawHandler(org.gvsig.fmap.geom.handler.Handler handler,
                        java.awt.geom.AffineTransform at)
Description copied from interface: MapControlDrawer
It draws a Handler on the map.

Specified by:
drawHandler in interface MapControlDrawer
Parameters:
handler - The Handler to draw.
at - A transformation that has to be applied to the Handler.

drawHandlers

public void drawHandlers(org.gvsig.fmap.geom.handler.Handler[] handlers,
                         java.awt.geom.AffineTransform at,
                         org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
Description copied from interface: MapControlDrawer
It draws the Handler's that compose a geometry on the map.

Specified by:
drawHandlers in interface MapControlDrawer
Parameters:
handlers - An array of Handler's.
at - A transformation that has to be applied to the Handler's.
symbol - The symbol used to draw the handlers.

drawImage

public void drawImage(java.awt.Image img,
                      java.awt.geom.AffineTransform xform)
Description copied from interface: MapControlDrawer
It draws image, applying a transform from image space into user space before drawing.

Specified by:
drawImage in interface MapControlDrawer
Parameters:
img - The image to draw.
xform - The transform to apply.

drawImage

public void drawImage(java.awt.Image img,
                      int x,
                      int y)
Description copied from interface: MapControlDrawer
It draws an image on a map in a concrete position.

Specified by:
drawImage in interface MapControlDrawer
Parameters:
img - The image to draw.
x - The X coordinate,
y - The Y coordinate.

drawLine

public void drawLine(java.awt.geom.Point2D firstPoint,
                     java.awt.geom.Point2D endPoint,
                     org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
Description copied from interface: MapControlDrawer
It draws a line using a concrete symbol.

Specified by:
drawLine in interface MapControlDrawer
Parameters:
firstPoint - The first point of the line.
endPoint - The end point of the line.
symbol - The symbol used to draw the line.

setComposite

public void setComposite(java.awt.Composite composite)
Specified by:
setComposite in interface MapControlDrawer

setViewPort

public void setViewPort(org.gvsig.fmap.mapcontext.ViewPort viewPort)
Description copied from interface: MapControlDrawer
The ViewPort is used to transform the map coordinates in the screen coordinates.

Specified by:
setViewPort in interface MapControlDrawer
Parameters:
viewPort - The ViewPort

transform

public void transform(java.awt.geom.AffineTransform at)
Specified by:
transform in interface MapControlDrawer


Copyright © 2014 gvSIG Association. All Rights Reserved.