Examples of PolygonSymbolizer


Examples of org.geotools.styling.PolygonSymbolizer

        assertEquals(20, img.getWidth());
    }
   
    public void testResizeGraphicFill() throws Exception {
        URL url = StreamingRenderer.class.getResource("test-data/");
        PolygonSymbolizer symb = sf.createPolygonSymbolizer();
        ExternalGraphic eg = sf.createExternalGraphic(url + "icon64.png", "image/png");
        Graphic g = sf.createGraphic(new ExternalGraphic[] {eg}, null, null, null, ff.literal(20), null);
        Fill fill = sf.createFill(null, null, null, g);
        symb.setFill(fill);
       
        PolygonStyle2D ps = sld.createPolygonStyle(feature, symb, range);
        assertTrue(ps.getFill() instanceof TexturePaint);
        TexturePaint paint = (TexturePaint) ps.getFill();
        assertEquals(20, paint.getImage().getWidth());
View Full Code Here

Examples of org.opengis.style.PolygonSymbolizer

        // what... nothing getting encoded??
    }
   
    @Test
    public void testRoundTripPolygon() throws Exception {
        PolygonSymbolizer sym = (PolygonSymbolizer) parse("example-polygonsymbolizer-local-uom.xml");
        assertEquals(SI.METER, sym.getUnitOfMeasure());
        assertEquals("2m", sym.getStroke().getWidth().evaluate(null, String.class));
        Document doc = encode(sym, SE.PolygonSymbolizer);
        // print(doc);
        // what... nothing getting encoded??
    }
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.