public interface MapControlDrawer extends PrimitivesDrawer
Represents a class that can write objects in a map like a raster image, a
Geometry
or other graphical objects. This class doesn't depend of the
dimension of the map (2D or 3D).
The Map Control has to have an instance of this class that can be accessed
using the MapControl.getMapControlDrawer()
method. When a Map Control
is created some tools are added to this component using the
MapControl.addBehavior(String, org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior)
method. Some of these tools need to draw some objects in the map and they use
the MapControlDrawer class to do that.
Modifier and Type | Method and Description |
---|---|
void |
cleanCanvas(MapControl mapCtrl)
Cleans the graphics using the image of the MapControl
|
void |
draw(Geometry geometry)
It draws a
Geometry on the map using the color
specified using the PrimitivesDrawer.setColor(Color) method. |
void |
draw(Geometry geometry,
ISymbol symbol)
It draws a
Geometry on the map using a concrete
symbol. |
void |
draw(Geometry geometry,
ISymbol symbol,
Feature feature)
It draws a
Geometry on the map using a concrete
symbol. |
void |
drawHandler(Handler handler,
AffineTransform at)
It draws a
Handler on the map. |
void |
drawHandlers(Handler[] handlers,
AffineTransform at,
ISymbol symbol)
It draws the
Handler 's that compose a geometry
on the map. |
void |
drawImage(Image img,
AffineTransform xform)
It draws image, applying a transform from image space
into user space before drawing.
|
void |
drawImage(Image img,
int x,
int y)
It draws an image on a map in a concrete position.
|
void |
drawLine(Point2D firstPoint,
Point2D endPoint,
ISymbol symbol)
It draws a line using a concrete symbol.
|
void |
setComposite(Composite instance) |
void |
setRenderingHints(RenderingHints hints)
Replaces the values of all preferences for the rendering algorithms with the specified hints.
|
void |
setStroke(Stroke stroke)
Sets the Stroke for the Graphics2D context.
|
void |
setViewPort(ViewPort viewPort)
The
ViewPort is used to transform the map
coordinates in the screen coordinates. |
void |
transform(AffineTransform at) |
drawLine, drawOval, drawRect, fillRect, setColor, setGraphics, startDrawing, stopDrawing
void setViewPort(ViewPort viewPort)
ViewPort
is used to transform the map
coordinates in the screen coordinates.viewPort
- The ViewPort
void draw(Geometry geometry)
Geometry
on the map using the color
specified using the PrimitivesDrawer.setColor(Color)
method.geometry
- The Geometry
to draw.void draw(Geometry geometry, ISymbol symbol)
Geometry
on the map using a concrete
symbol.geometry
- The Geometry
to draw.symbol
- The symbol used to draw the geometry.void draw(Geometry geometry, ISymbol symbol, Feature feature)
Geometry
on the map using a concrete
symbol.geometry
- The Geometry
to draw.symbol
- The symbol used to draw the geometry.feature
- The feature used to draw the geometry.void drawHandlers(Handler[] handlers, AffineTransform at, ISymbol symbol)
Handler
's that compose a geometry
on the map.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.void drawLine(Point2D firstPoint, Point2D endPoint, ISymbol symbol)
firstPoint
- The first point of the line.endPoint
- The end point of the line.symbol
- The symbol used to draw the line.void drawImage(Image img, int x, int y)
img
- The image to draw.x
- The X coordinate,y
- The Y coordinate.void drawImage(Image img, AffineTransform xform)
img
- The image to draw.xform
- The transform to apply.void drawHandler(Handler handler, AffineTransform at)
Handler
on the map.handler
- The Handler
to draw.at
- A transformation that has to be applied to the
Handler
.void transform(AffineTransform at)
at
- void setComposite(Composite instance)
instance
- void setRenderingHints(RenderingHints hints)
hints
- the rendering hints to be setvoid setStroke(Stroke stroke)
stroke
- the Stroke object to be used to stroke a Shape during the renderingvoid cleanCanvas(MapControl mapCtrl)
mapCtrl
-