|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
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 |
removeRenderListener(RenderListener listener)
|
void |
setContext(MapContext context)
|
void |
setJava2DHints(java.awt.RenderingHints hints)
|
void |
setRendererHints(java.util.Map hints)
|
void |
stopRendering()
|
Method Detail |
public void stopRendering()
public void addRenderListener(RenderListener listener)
public void removeRenderListener(RenderListener listener)
public void setJava2DHints(java.awt.RenderingHints hints)
public java.awt.RenderingHints getJava2DHints()
public void setRendererHints(java.util.Map hints)
public java.util.Map getRendererHints()
public void setContext(MapContext context)
public MapContext getContext()
public 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.public 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).public 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).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 |