|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GTRenderer
Typical usage:
Rectangle paintArea = new Rectangle(width, height); Envelope mapArea = map.getAreaOfInterest(); renderer = new StreamingRenderer(); renderer.setContext(map); RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON ); renderer.setJava2DHints(hints); Map rendererParams = new HashMap(); rendererParams.put("optimizedDataLoadingEnabled",new Boolean(true) ); renderer.paint(graphic, paintArea, mapArea);
Method Summary | |
---|---|
void |
addRenderListener(RenderListener listener)
|
MapContext |
getContext()
|
java.awt.RenderingHints |
getJava2DHints()
|
java.util.Map<java.lang.Object,java.lang.Object> |
getRendererHints()
|
void |
paint(java.awt.Graphics2D graphics,
java.awt.Rectangle paintArea,
java.awt.geom.AffineTransform worldToScreen)
Renders features based on the map layers and their styles as specified in the map context using setContext . |
void |
paint(java.awt.Graphics2D graphics,
java.awt.Rectangle paintArea,
com.vividsolutions.jts.geom.Envelope mapArea)
Renders features based on the map layers and their styles as specified in the map context using setContext . |
void |
paint(java.awt.Graphics2D graphics,
java.awt.Rectangle paintArea,
com.vividsolutions.jts.geom.Envelope mapArea,
java.awt.geom.AffineTransform worldToScreen)
Renders features based on the map layers and their styles as specified in the map context using setContext . |
void |
paint(java.awt.Graphics2D graphics,
java.awt.Rectangle paintArea,
ReferencedEnvelope mapArea)
Renders features based on the map layers and their styles as specified in the map context using setContext . |
void |
paint(java.awt.Graphics2D graphics,
java.awt.Rectangle paintArea,
ReferencedEnvelope mapArea,
java.awt.geom.AffineTransform worldToScreen)
Renders features based on the map layers and their styles as specified in the map context using setContext . |
void |
removeRenderListener(RenderListener listener)
|
void |
setContext(MapContext context)
|
void |
setJava2DHints(java.awt.RenderingHints hints)
|
void |
setRendererHints(java.util.Map<java.lang.Object,java.lang.Object> hints)
|
void |
stopRendering()
|
Method Detail |
---|
void stopRendering()
void addRenderListener(RenderListener listener)
void removeRenderListener(RenderListener listener)
void setJava2DHints(java.awt.RenderingHints hints)
java.awt.RenderingHints getJava2DHints()
void setRendererHints(java.util.Map<java.lang.Object,java.lang.Object> hints)
java.util.Map<java.lang.Object,java.lang.Object> getRendererHints()
void setContext(MapContext context)
MapContext getContext()
void paint(java.awt.Graphics2D graphics, java.awt.Rectangle paintArea, java.awt.geom.AffineTransform worldToScreen)
setContext
.
This version of the method assumes that the size of the output area
and the transformation from coordinates to pixels are known.
The latter determines the map scale. The viewport (the visible
part of the map) will be calculated internally.
graphics
- The graphics object to draw to.paintArea
- The size of the output area in output units (eg: pixels).worldToScreen
- A transform which converts World coordinates to Screen coordinates.void paint(java.awt.Graphics2D graphics, java.awt.Rectangle paintArea, com.vividsolutions.jts.geom.Envelope mapArea)
setContext
.
This version of the method assumes that the area of the visible part
of the map and the size of the output area are known. The transform
between the two is calculated internally.
graphics
- The graphics object to draw to.paintArea
- The size of the output area in output units (eg: pixels).mapArea
- the map's visible area (viewport) in map coordinates.void paint(java.awt.Graphics2D graphics, java.awt.Rectangle paintArea, ReferencedEnvelope mapArea)
setContext
. This version of
the method assumes that the area of the visible part of the map and the
size of the output area are known. The transform between the two is
calculated internally.
graphics
- The graphics object to draw to.paintArea
- The size of the output area in output units (eg: pixels).mapArea
- the map's visible area (viewport) in map coordinates.void paint(java.awt.Graphics2D graphics, java.awt.Rectangle paintArea, com.vividsolutions.jts.geom.Envelope mapArea, java.awt.geom.AffineTransform worldToScreen)
setContext
.
This version of the method assumes that paint area, enelope and
worldToScreen transform are already computed and in sync. Use this method
to avoid recomputation. Note however that no check is performed that
they are really synchronized!
graphics
- The graphics object to draw to.paintArea
- The size of the output area in output units (eg: pixels).mapArea
- the map's visible area (viewport) in map coordinates.worldToScreen
- A transform which converts World coordinates to Screen coordinates.void paint(java.awt.Graphics2D graphics, java.awt.Rectangle paintArea, ReferencedEnvelope mapArea, java.awt.geom.AffineTransform worldToScreen)
setContext
. This version of
the method assumes that paint area, enelope and worldToScreen transform
are already computed and in sync. Use this method to avoid recomputation.
Note however that no check is performed that they are really
synchronized!
graphics
- The graphics object to draw to.paintArea
- The size of the output area in output units (eg: pixels).mapArea
- the map's visible area (viewport) in map coordinates.worldToScreen
- A transform which converts World coordinates to Screen
coordinates.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |