Package org.geotools.styling

Examples of org.geotools.styling.LineSymbolizer.accept()


            PolygonSymbolizer ps = (PolygonSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof LineSymbolizer) {
            LineSymbolizer ps = (LineSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof TextSymbolizer) {
            TextSymbolizer ps = (TextSymbolizer) arg0;
            ps.accept(this);
        }
View Full Code Here


            LineSymbolizer ps = (LineSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof TextSymbolizer) {
            TextSymbolizer ps = (TextSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof RasterSymbolizer) {
            RasterSymbolizer ps = (RasterSymbolizer) arg0;
            ps.accept(this);
        }
View Full Code Here

            TextSymbolizer ps = (TextSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof RasterSymbolizer) {
            RasterSymbolizer ps = (RasterSymbolizer) arg0;
            ps.accept(this);
        }
    }

    public void visit( PointSymbolizer arg0 ) {
        arg0.getGraphic().accept(this);
View Full Code Here

            ps.accept(this);
        }

        if (sym instanceof LineSymbolizer) {
            LineSymbolizer ps = (LineSymbolizer) sym;
            ps.accept(this);
        }

        if (sym instanceof PolygonSymbolizer) {
            PolygonSymbolizer ps = (PolygonSymbolizer) sym;
            ps.accept(this);
View Full Code Here

            ps.accept(this);
        }

        if (sym instanceof PolygonSymbolizer) {
            PolygonSymbolizer ps = (PolygonSymbolizer) sym;
            ps.accept(this);
        }

        if (sym instanceof RasterSymbolizer) {
            RasterSymbolizer rs = (RasterSymbolizer) sym;
            rs.accept(this);
View Full Code Here

    @Test
    public void testNoUnit() throws Exception {
        Stroke original = sb.createStroke(Color.RED, 2, new float[] { 5, 10 });
        LineSymbolizer ls = sb.createLineSymbolizer(original);
        ls.accept(visitor);
        Stroke clone = ((LineSymbolizer) visitor.getCopy()).getStroke();

        assertEquals(4.0d, clone.getWidth().evaluate(null, Double.class), 0d);
        assertEquals(10.0f, clone.getDashArray()[0], 0f);
        assertEquals(20.0f, clone.getDashArray()[1], 0f);
View Full Code Here

    @Test
    public void testAllMeters() throws Exception {
        Stroke original = sb.createStroke(Color.RED, 2, new float[] { 5, 10 });
        LineSymbolizer ls = sb.createLineSymbolizer(original);
        ls.setUnitOfMeasure(SI.METER);
        ls.accept(visitor);
        Stroke clone = ((LineSymbolizer) visitor.getCopy()).getStroke();

        assertEquals(2d, clone.getWidth().evaluate(null, Double.class), 0d);
        assertEquals(5f, clone.getDashArray()[0], 0f);
        assertEquals(10f, clone.getDashArray()[1], 0f);
View Full Code Here

    @Test
    public void testAllFeet() throws Exception {
        Stroke original = sb.createStroke(Color.RED, 2, new float[] { 5, 10 });
        LineSymbolizer ls = sb.createLineSymbolizer(original);
        ls.setUnitOfMeasure(NonSI.FOOT);
        ls.accept(visitor);
        Stroke clone = ((LineSymbolizer) visitor.getCopy()).getStroke();

        assertEquals(2d, clone.getWidth().evaluate(null, Double.class), 0d);
        assertEquals(5f, clone.getDashArray()[0], 0f);
        assertEquals(10f, clone.getDashArray()[1], 0f);
View Full Code Here

    public void testSymbolizerMeterOverrideInPixels() throws Exception {
        Stroke original = sb.createStroke(Color.RED, 2, new float[] { 5, 10 });
        original.setWidth(ff.literal("2px"));
        LineSymbolizer ls = sb.createLineSymbolizer(original);
        ls.setUnitOfMeasure(SI.METER);
        ls.accept(visitor);
        Stroke clone = ((LineSymbolizer) visitor.getCopy()).getStroke();

        // this one has been rescaled
        assertEquals(4d, clone.getWidth().evaluate(null, Double.class), 0d);
        // the dash array did not, it's supposed to be meters
View Full Code Here

    @Test
    public void testSymbolizerPixelOverrideInMeters() throws Exception {
        Stroke original = sb.createStroke(Color.RED, 2, new float[] { 5, 10 });
        original.setWidth(ff.literal("2m"));
        LineSymbolizer ls = sb.createLineSymbolizer(original);
        ls.accept(visitor);
        Stroke clone = ((LineSymbolizer) visitor.getCopy()).getStroke();

        // this one has not been rescaled
        assertEquals("2m", clone.getWidth().evaluate(null, String.class));
        // the dash array did , it's supposed to be pixels
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.