Package org.geotools.renderer.lite
Class StyledShapePainter
Object
StyledShapePainter
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanWhether to apply the new vector hatch fill optimization, or not (on by default, this is just a safeguard)static booleanWhether icon centers should be matched to a pixel center, or notstatic final RenderingHints.Key -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpaint(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 Details
-
TEXTURE_ANCHOR_HINT_KEY
-
ROUND_ICON_COORDS
public static boolean ROUND_ICON_COORDSWhether icon centers should be matched to a pixel center, or not -
OPTIMIZE_VECTOR_HATCH_FILLS
public static boolean OPTIMIZE_VECTOR_HATCH_FILLSWhether to apply the new vector hatch fill optimization, or not (on by default, this is just a safeguard)
-
-
Constructor Details
-
StyledShapePainter
public StyledShapePainter() -
StyledShapePainter
-
-
Method Details
-
paint
-
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.
-