Interface GTRenderer
- 
- All Known Implementing Classes:
- StreamingRenderer
 
 public interface GTRendererGeoTools renderer for rendering spatial content into a Graphics2D. Typical usage:Rectangle paintArea = new Rectangle(width, height); ReferencedEnvelope mapArea = map.getBounds(); renderer = new StreamingRenderer(); renderer.setContext(map); RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON ); renderer.setJava2DHints(hints); Map- Author:
- David Blasby, Simone Giannecchini
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRenderListener(RenderListener listener)adds a listener that responds to error events of feature rendered events.RenderingHintsgetJava2DHints()Hints used to configure Java2D Graphics prior to rendering.MapContentgetMapContent()Gets theMapContentinstance which contains the data being rendered.Map<Object,Object>getRendererHints()Hints used to configure rendering processvoidpaint(Graphics2D graphics, Rectangle paintArea, AffineTransform worldToScreen)Renders features based on the map layers and their styles as specified in the map content usingsetContext.voidpaint(Graphics2D graphics, Rectangle paintArea, ReferencedEnvelope mapArea)Renders features based on the map layers and their styles as specified in the map context usingsetContext.voidpaint(Graphics2D graphics, Rectangle paintArea, ReferencedEnvelope mapArea, AffineTransform worldToScreen)Renders features based on the map layers and their styles as specified in the map context usingsetContext.voidpaint(Graphics2D graphics, Rectangle paintArea, Envelope mapArea)Renders features based on the map layers and their styles as specified in the map context usingsetContext.voidpaint(Graphics2D graphics, Rectangle paintArea, Envelope mapArea, AffineTransform worldToScreen)Renders features based on the map layers and their styles as specified in the map context usingsetContext.voidremoveRenderListener(RenderListener listener)Removes a render listener.voidsetJava2DHints(RenderingHints hints)Hints used to configure Java2D Graphics prior to rendering.voidsetMapContent(MapContent mapContent)Sets theMapContentwhich contains the data to be rendered.voidsetRendererHints(Map<?,?> hints)Hints used to configure rendering process.voidstopRendering()If you call this method from another thread than the one that calledpaintorrenderthe rendering will be forcefully stopped before termination.
 
- 
- 
- 
Method Detail- 
stopRenderingvoid stopRendering() If you call this method from another thread than the one that calledpaintorrenderthe rendering will be forcefully stopped before termination.
 - 
addRenderListenervoid addRenderListener(RenderListener listener) adds a listener that responds to error events of feature rendered events.- Parameters:
- listener- the listener to add.
- See Also:
- RenderListener
 
 - 
removeRenderListenervoid removeRenderListener(RenderListener listener) Removes a render listener.- Parameters:
- listener- the listener to remove.
- See Also:
- RenderListener
 
 - 
setJava2DHintsvoid setJava2DHints(RenderingHints hints) Hints used to configure Java2D Graphics prior to rendering.
 - 
getJava2DHintsRenderingHints getJava2DHints() Hints used to configure Java2D Graphics prior to rendering.- Returns:
- Hints
 
 - 
setRendererHintsvoid setRendererHints(Map<?,?> hints) Hints used to configure rendering process.
 - 
getRendererHintsMap<Object,Object> getRendererHints() Hints used to configure rendering process- Returns:
- Hints used to configure rendering process
 
 - 
setMapContentvoid setMapContent(MapContent mapContent) Sets theMapContentwhich contains the data to be rendered.- Parameters:
- mapContent- the map content
 
 - 
getMapContentMapContent getMapContent() Gets theMapContentinstance which contains the data being rendered.- Returns:
- the MapContentinstance
 
 - 
paintvoid paint(Graphics2D graphics, Rectangle paintArea, AffineTransform worldToScreen) Renders features based on the map layers and their styles as specified in the map content usingsetContext.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. - Parameters:
- 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.
 
 - 
paintvoid paint(Graphics2D graphics, Rectangle paintArea, Envelope mapArea) Renders features based on the map layers and their styles as specified in the map context usingsetContext.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. - Parameters:
- 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.
 
 - 
paintvoid paint(Graphics2D graphics, Rectangle paintArea, ReferencedEnvelope mapArea) Renders features based on the map layers and their styles as specified in the map context usingsetContext.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. - Parameters:
- 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.
 
 - 
paintvoid paint(Graphics2D graphics, Rectangle paintArea, Envelope mapArea, AffineTransform worldToScreen) Renders features based on the map layers and their styles as specified in the map context usingsetContext.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! - Parameters:
- 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.
 
 - 
paintvoid paint(Graphics2D graphics, Rectangle paintArea, ReferencedEnvelope mapArea, AffineTransform worldToScreen) Renders features based on the map layers and their styles as specified in the map context usingsetContext.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! - Parameters:
- 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.
 
 
- 
 
-