Package org.opengis.style

Examples of org.opengis.style.Stroke


        List<GraphicalSymbol> symbols = graphic.graphicalSymbols();
        assertEquals(1, symbols.size());
        Mark mark = (Mark) symbols.get(0);
        assertEquals("circle", mark.getWellKnownName().evaluate(null));
        assertEquals(Color.RED, mark.getFill().getColor().evaluate(null, Color.class));
        Stroke stroke = mark.getStroke();
        assertEquals(Color.BLUE, stroke.getColor().evaluate(null, Color.class));
        assertEquals(2, (int) stroke.getWidth().evaluate(null, Integer.class));
    }
View Full Code Here


        Mark mark = (Mark) symbols.get(0);
        assertEquals("triangle", mark.getWellKnownName().evaluate(null));
        Fill fill = mark.getFill();
        assertEquals(Color.RED, fill.getColor().evaluate(null, Color.class));
        assertEquals(0.2, (double) fill.getOpacity().evaluate(null, Double.class), 0);
        Stroke stroke = mark.getStroke();
        assertEquals(Color.BLUE, stroke.getColor().evaluate(null, Color.class));
        assertEquals(2, (int) stroke.getWidth().evaluate(null, Integer.class));
    }
View Full Code Here

    org.opengis.style.StyleFactory sf = CommonFactoryFinder.getStyleFactory();
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
   
    //
    // create the graphical mark used to represent a city
    Stroke stroke = sf.stroke(ff.literal("#000000"), null, null, null, null, null, null);
    Fill fill = sf.fill(null, ff.literal(Color.BLUE), ff.literal(1.0));
   
    // OnLineResource implemented by gt-metadata - so no factory!
    OnLineResourceImpl svg = new OnLineResourceImpl(new URI("file:city.svg"));
    svg.freeze(); // freeze to prevent modification at runtime
View Full Code Here

        }
       
        GraphicalSymbol gs = g.graphicalSymbols().iterator().next();
       
        if(gs instanceof Mark) {
            Stroke stroke = ((Mark) gs).getStroke();
            if(stroke!=null){
                Double width = stroke.getWidth().evaluate(f, Double.class);
                if(width!=null) {
                    border = width;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.opengis.style.Stroke

Copyright © 2018 www.massapicom. 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.