Examples of graphicalSymbols()


Examples of org.geotools.styling.Graphic.graphicalSymbols()

        if (graphic.graphicalSymbols().isEmpty()) {
            Fill fill = createFill(styleJson);
            Stroke stroke = createStroke(styleJson, false);

            final Mark mark = this.styleBuilder.createMark(DEFAULT_POINT_MARK, fill, stroke);
            graphic.graphicalSymbols().add(mark);
        }

        graphic.setOpacity(parseExpression(null, styleJson, JSON_GRAPHIC_OPACITY, new Function<String, Object>() {
            @Nullable
            @Override
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        transformer.transform(symbolizer); // assert it can be converted to SLD

        final Graphic graphic = symbolizer.getGraphic();
        assertNotNull(graphic);

        final List<GraphicalSymbol> graphicalSymbols = graphic.graphicalSymbols();

        assertEquals(1, graphicalSymbols.size());

        ExternalGraphic externalGraphic = (ExternalGraphic) graphicalSymbols.get(0);
        assertEquals("image/png", externalGraphic.getFormat());
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        assertNotNull(symbolizer);

        transformer.transform(symbolizer); // verify it can be encoded without exceptions

        final Graphic graphic = symbolizer.getGraphic();
        assertEquals(1, graphic.graphicalSymbols().size());

        Mark externalGraphic = (Mark) graphic.graphicalSymbols().get(0);

        assertEquals("circle", valueOf(externalGraphic.getWellKnownName()));
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        transformer.transform(symbolizer); // verify it can be encoded without exceptions

        final Graphic graphic = symbolizer.getGraphic();
        assertEquals(1, graphic.graphicalSymbols().size());

        Mark externalGraphic = (Mark) graphic.graphicalSymbols().get(0);

        assertEquals("circle", valueOf(externalGraphic.getWellKnownName()));

        assertFill(fillOpacity, "#EEEEEE", externalGraphic.getFill());
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        PJsonObject pJson = new PJsonObject(json, "symbolizers");
        final PointSymbolizer pointSymbolizer = this.helper.createPointSymbolizer(pJson);
        assertNotNull(pointSymbolizer);

        final Graphic graphic = pointSymbolizer.getGraphic();
        assertEquals(1, graphic.graphicalSymbols().size());
        Mark mark = (Mark) graphic.graphicalSymbols().get(0);

        assertEquals("circle", valueOf(mark.getWellKnownName()));
        assertNotNull(mark.getFill());
        assertNotNull(mark.getStroke());
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        final PointSymbolizer pointSymbolizer = this.helper.createPointSymbolizer(pJson);
        assertNotNull(pointSymbolizer);

        final Graphic graphic = pointSymbolizer.getGraphic();
        assertEquals(1, graphic.graphicalSymbols().size());
        Mark mark = (Mark) graphic.graphicalSymbols().get(0);

        assertEquals("circle", valueOf(mark.getWellKnownName()));
        assertNotNull(mark.getFill());
        assertNotNull(mark.getStroke());
    }
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        PJsonObject pJson = new PJsonObject(json, "symbolizers");
        final PointSymbolizer pointSymbolizer = this.helper.createPointSymbolizer(pJson);
        assertNotNull(pointSymbolizer);

        final Graphic graphic = pointSymbolizer.getGraphic();
        Mark mark = (Mark) graphic.graphicalSymbols().get(0);
        Stroke stroke = mark.getStroke();
        assertArrayEquals(Arrays.toString(stroke.getDashArray()), new float[]{5f, 4f}, stroke.getDashArray(), FLOAT_DELTA);
    }

    @Test
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        final Graphic graphic = pointSymbolizer.getGraphic();
        assertEquals("rotation", propertyName(graphic.getRotation()));
        assertEquals("graphicOpacity", propertyName(graphic.getOpacity()));
        assertEquals("pointRadius", propertyName(graphic.getSize()));

        Mark mark = (Mark) graphic.graphicalSymbols().get(0);
        assertEquals("graphicName", propertyName(mark.getWellKnownName()));

        assertEquals("fillOpacity", propertyName(mark.getFill().getOpacity()));
        assertEquals("fillColor", propertyName(mark.getFill().getColor()));
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

                Mark mark = sf.getCircleMark();
                mark.setFill(fill);
                mark.setStroke(stroke);

                Graphic graphic = sf.createDefaultGraphic();
                graphic.graphicalSymbols().clear();
                graphic.graphicalSymbols().add(mark);
                graphic.setSize(ff.literal(POINT_SIZE));

                symbolizer = sf.createPointSymbolizer(graphic, geometryAttributeName);
        }
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

                mark.setFill(fill);
                mark.setStroke(stroke);

                Graphic graphic = sf.createDefaultGraphic();
                graphic.graphicalSymbols().clear();
                graphic.graphicalSymbols().add(mark);
                graphic.setSize(ff.literal(POINT_SIZE));

                symbolizer = sf.createPointSymbolizer(graphic, geometryAttributeName);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.