@Test public void testGraphicLegendNegativeScale() throws Exception { final URL imageURL = TestData.getResource(this, "icon64.png"); final BufferedImage testImage = ImageIO.read(imageURL); final int width = testImage.getWidth(); final int height = testImage.getHeight(); final Style style = RendererBaseTest.loadStyle(this, "testGraphicLegend.sld"); final Rule rule = style.featureTypeStyles().get(0).rules().get(0); final GraphicLegend legend = (GraphicLegend) rule.getLegend(); final Point point = new GeometryFactory().createPoint(new Coordinate(width / 2, height / 2)); final LiteShape2 shape = new LiteShape2(point, null, null, false); int imageType = testImage.getType(); if (imageType == BufferedImage.TYPE_CUSTOM) { imageType = BufferedImage.TYPE_INT_RGB; } final BufferedImage paintedImage = new BufferedImage(width, height, imageType); final Graphics2D graphics = paintedImage.createGraphics(); final StyledShapePainter painter = new StyledShapePainter(); painter.paint(graphics, shape, legend, -1, false); graphics.dispose(); Assert.assertTrue(imagesIdentical(paintedImage, testImage)); }
public void paint( final Graphics2D graphics, final LiteShape2 shape, final Style2D style, final double scale) { paint(graphics, shape, style, scale, false); }
StyledShapePainter { public void paint( final Graphics2D graphics, final LiteShape2 shape, final Style2D style, final double scale) { paint(graphics, shape, style, scale, false); } }
StyledShapePainter { public void paint( final Graphics2D graphics, final LiteShape2 shape, final Style2D style, final double scale) { paint(graphics, shape, style, scale, false); } StyledShapePainter();  StyledShapePainter(LabelCache cache); }
StyledShapePainter { public void paint( final Graphics2D graphics, final LiteShape2 shape, final Style2D style, final double scale) { paint(graphics, shape, style, scale, false); } StyledShapePainter();  StyledShapePainter(LabelCache cache); void paint(
            final Graphics2D graphics,
            final LiteShape2 shape,
            final Style2D style,
            final double scale); void paint(
            final Graphics2D graphics,
            final LiteShape2 shape,
            final Style2D style,
            final double scale,
            boolean isLabelObstacle); void paint(
            final Graphics2D graphics,
            final LiteShape2 shape,
            final GraphicLegend legend,
            final double symbolScale,
            boolean isLabelObstacle); }
StyledShapePainter { public void paint( final Graphics2D graphics, final LiteShape2 shape, final Style2D style, final double scale) { paint(graphics, shape, style, scale, false); } StyledShapePainter();  StyledShapePainter(LabelCache cache); void paint(
            final Graphics2D graphics,
            final LiteShape2 shape,
            final Style2D style,
            final double scale); void paint(
            final Graphics2D graphics,
            final LiteShape2 shape,
            final Style2D style,
            final double scale,
            boolean isLabelObstacle); void paint(
            final Graphics2D graphics,
            final LiteShape2 shape,
            final GraphicLegend legend,
            final double symbolScale,
            boolean isLabelObstacle); static final Key TEXTURE_ANCHOR_HINT_KEY; static boolean ROUND_ICON_COORDS; static boolean OPTIMIZE_VECTOR_HATCH_FILLS; }