org.geotools.renderer.lite
Class StyledShapePainter

Object
  extended by StyledShapePainter

public final class StyledShapePainter
extends Object

A simple class that knows how to paint a Shape object onto a Graphic given a Style2D. It's the last step of the rendering engine, and has been factored out since both renderers do use the same painting logic.

Author:
Andrea Aime

Nested Class Summary
static class StyledShapePainter.TextureAnchorKey
           
 
Field Summary
static boolean ROUND_ICON_COORDS
          Whether icon centers should be matched to a pixel center, or not
static RenderingHints.Key TEXTURE_ANCHOR_HINT_KEY
           
 
Constructor Summary
StyledShapePainter()
           
StyledShapePainter(LabelCache cache)
          Deprecated. Use the no arguments constructor instead
 
Method Summary
 void paint(Graphics2D graphics, LiteShape2 shape, GraphicLegend legend, double symbolScale, boolean isLabelObstacle)
          Paints a GraphicLegend in the supplied graphics
 void paint(Graphics2D graphics, LiteShape2 shape, Style2D style, double scale)
           
 void paint(Graphics2D graphics, LiteShape2 shape, Style2D style, double scale, boolean isLabelObstacle)
          Invoked automatically when a polyline is about to be draw.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXTURE_ANCHOR_HINT_KEY

public static final RenderingHints.Key TEXTURE_ANCHOR_HINT_KEY

ROUND_ICON_COORDS

public static boolean ROUND_ICON_COORDS
Whether icon centers should be matched to a pixel center, or not

Constructor Detail

StyledShapePainter

public StyledShapePainter()

StyledShapePainter

@Deprecated
public StyledShapePainter(LabelCache cache)
Deprecated. Use the no arguments constructor instead

Method Detail

paint

public void paint(Graphics2D graphics,
                  LiteShape2 shape,
                  Style2D style,
                  double scale)

paint

public void paint(Graphics2D graphics,
                  LiteShape2 shape,
                  Style2D style,
                  double scale,
                  boolean isLabelObstacle)
Invoked automatically when a polyline is about to be draw. This implementation paints the polyline according to the rendered style

Parameters:
graphics - The graphics in which to draw.
shape - The polygon to draw.
style - The style to apply, or null if none.
scale - The scale denominator for the current zoom level
Throws:
FactoryException
TransformException

paint

public void paint(Graphics2D graphics,
                  LiteShape2 shape,
                  GraphicLegend legend,
                  double symbolScale,
                  boolean isLabelObstacle)
Paints a GraphicLegend in the supplied graphics

Parameters:
graphics - The graphics in which to draw.
shape - The shape to draw.
legend - The legend to apply.
symbolScale - The scale of the symbol, if the legend graphic has to be rescaled


Copyright © 1996-2014 Geotools. All Rights Reserved.