Examples of Fill


Examples of org.geotools.styling.Fill

        SimpleFeatureType schema = getLayer().getSchema();
        geometryName.setInput(schema);
        String name = DEFAULT_GEOMETRY;

        Stroke stroke = null;
        Fill fill = null;
        Graphic graphic = null;
        TextSymbolizer text = null;
        LabelPlacement placement = null;

        List<Rule> rules = fts.rules();
View Full Code Here

Examples of org.geotools.styling.Fill

                } else if (symbolizer instanceof PolygonSymbolizer) {
                    PolygonSymbolizer polygonSymbolizer = (PolygonSymbolizer) symbolizer;
                    Stroke stroke = polygonSymbolizer.getStroke();
                    if (stroke != null)
                        graphics[0] = stroke.getGraphicStroke();
                    Fill fill = polygonSymbolizer.getFill();
                    if (fill != null)
                        graphics[1] = fill.getGraphicFill();
                }
                for( int i = 0; i < graphics.length; i++ ) {
                    if (graphics[i] != null) {
                        for( GraphicalSymbol gs : graphics[i].graphicalSymbols() ) {
                            if ((gs != null) && (gs instanceof ExternalGraphic)) {
View Full Code Here

Examples of org.geotools.styling.Fill

        return styleBuilder;
    }

    protected static PointSymbolizer createPointSymbolizer(Color colour) {
        PointSymbolizer symb=styleBuilder.createPointSymbolizer();
        Fill fill = styleBuilder.createFill(colour, 1.0);       

        Stroke outline=styleBuilder.createStroke(Color.BLACK,1,1);

        // check existing default graphics
        if (symb.getGraphic().graphicalSymbols() != null && symb.getGraphic().graphicalSymbols().size() == 1) {
View Full Code Here

Examples of org.geotools.styling.Fill

        Stroke stroke = styleBuilder.createStroke();
        stroke.setColor(styleBuilder.colorExpression(colour));
        stroke.setWidth(styleBuilder.literalExpression(1));

        Fill fill = styleBuilder.createFill();
        fill.setColor(styleBuilder.colorExpression(colour));
        fill.setOpacity(styleBuilder.literalExpression(.5));

        PolygonSymbolizer symbolizer = styleBuilder.createPolygonSymbolizer(stroke, fill);

        return symbolizer;
    }
View Full Code Here

Examples of org.geotools.styling.Fill

        public void visit( PolygonSymbolizer poly ) {
            Stroke stroke = poly.getStroke();
            if (stroke != null) {
                stroke.accept(this);
            }
            Fill fill = poly.getFill();
            if (fill != null) {
                fill.accept(this);
            }
        }
View Full Code Here

Examples of org.geotools.styling.Fill

    }

    private void applyFill( PolygonSymbolizer polygonSymbolizer, StyleBuilder styleBuilder ) {
        if (fillEnabled.getSelection()) {
            RGB c = fillColour.getColorValue();
            Fill fill = polygonSymbolizer.getFill();
            if (fill == null) {
                fill = styleBuilder.createFill();
                polygonSymbolizer.setFill(fill);
            }

            fill.setColor(styleBuilder.colorExpression(new Color(c.red, c.green, c.blue)));
            fill.setOpacity(styleBuilder.literalExpression(fillOpacity.getSelection()
                    / opacityMaxValueFloat));
        } else {
            polygonSymbolizer.setFill(null);
        }
    }
View Full Code Here

Examples of org.geotools.styling.Fill

        boolean fontBold = (this.font[0].getStyle() == SWT.BOLD);
        boolean fontItalic = (this.font[0].getStyle() == SWT.ITALIC);
        double fontSize = this.font[0].getHeight();
        Font gtFont = build.createFont(
                fontName, fontItalic, fontBold, fontSize);
        Fill fill = build.createFill(this.colour);
       
        LabelPlacement placement;
        if (pointPlacement) {
            //PointPlacement
            double horiz;
View Full Code Here

Examples of org.geotools.styling.Fill

                Rule rule = (Rule) data;
                Symbolizer[] symb = rule.getSymbolizers();
                if (symb.length == 1) { //we're only expecting 1
                    if (symb[0] instanceof PolygonSymbolizer) {
                        PolygonSymbolizer ps = (PolygonSymbolizer) symb[0];
                        Fill fill = ps.getFill();
                        oldColorExpr = fill.getColor();
                        fill.setColor(newColorExpr);
                    }else if (symb[0] instanceof PointSymbolizer) {
                        PointSymbolizer ps = (PointSymbolizer) symb[0];
                        Mark[] marks = ps.getGraphic().getMarks();
                        if(marks!=null && marks.length>0){
                            oldColorExpr = marks[0].getFill().getColor();
View Full Code Here

Examples of org.geotools.styling.Fill

        return styles[0];
    }

    protected PointSymbolizer createPointSymbolizer( Color colour, int size ) {
        Fill fill = styleBuilder.createFill(Color.YELLOW, 0.0);
        Stroke stroke = builder.createStroke(colour, 2);
        Mark mark = styleBuilder.createMark("square", fill, stroke); //$NON-NLS-1$

        Graphic graph2 = styleBuilder.createGraphic(null, mark, null, 1, size, 0);
        PointSymbolizer symb = styleBuilder.createPointSymbolizer(graph2);
View Full Code Here

Examples of org.geotools.styling.Fill

        // if( dashed ){
        // stroke.setDashArray(new float[]{5, 3});
        // }
        // symbolizer.setStroke(stroke);

        Fill fill = styleBuilder.createFill();
        fill.setColor(styleBuilder.colorExpression(colour));
        fill.setOpacity(styleBuilder.literalExpression(.5));
        symbolizer.setFill(fill);

        return symbolizer;
    }
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.