Package org.geotools.renderer.lite
Class StyledShapePainter
- Object
-
- StyledShapePainter
-
public 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
Nested Classes Modifier and Type Class Description static classStyledShapePainter.TextureAnchorKey
-
Field Summary
Fields Modifier and Type Field Description static booleanOPTIMIZE_VECTOR_HATCH_FILLSWhether to apply the new vector hatch fill optimization, or not (on by default, this is just a safeguard)static booleanROUND_ICON_COORDSWhether icon centers should be matched to a pixel center, or notstatic RenderingHints.KeyTEXTURE_ANCHOR_HINT_KEY
-
Constructor Summary
Constructors Constructor Description StyledShapePainter()StyledShapePainter(LabelCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpaint(Graphics2D graphics, LiteShape2 shape, GraphicLegend legend, double symbolScale, boolean isLabelObstacle)Paints a GraphicLegend in the supplied graphicsvoidpaint(Graphics2D graphics, LiteShape2 shape, Style2D style, double scale)voidpaint(Graphics2D graphics, LiteShape2 shape, Style2D style, double scale, boolean isLabelObstacle)Invoked automatically when a polyline is about to be draw.protected voidpaintGraphicFill(Graphics2D graphics, Shape shape, Style2D graphicFill, double scale)Paints a graphic fill for a given shape.
-
-
-
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
-
OPTIMIZE_VECTOR_HATCH_FILLS
public static boolean OPTIMIZE_VECTOR_HATCH_FILLS
Whether to apply the new vector hatch fill optimization, or not (on by default, this is just a safeguard)
-
-
Constructor Detail
-
StyledShapePainter
public StyledShapePainter()
-
StyledShapePainter
public StyledShapePainter(LabelCache cache)
-
-
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, ornullif none.scale- The scale denominator for the current zoom level
-
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
-
paintGraphicFill
protected void paintGraphicFill(Graphics2D graphics, Shape shape, Style2D graphicFill, double scale)
Paints a graphic fill for a given shape.- Parameters:
graphics- Graphics2D on which to paint.shape- Shape whose fill is to be painted.graphicFill- a Style2D that specified the graphic fill.scale- the scale of the current render.
-
-