Examples of Mark


Examples of org.geotools.styling.Mark

    }

    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);

        symb.getGraphic().setMarks(new Mark[]{mark});
View Full Code Here

Examples of org.geotools.styling.Mark

        if (symbolizers.length > 0) {
            Symbolizer symbolizer = symbolizers[0];
            if (symbolizer instanceof PointSymbolizer) {
                PointSymbolizer previousSymbolizer = (PointSymbolizer) symbolizer;
                Graphic oldGraphic = SLDs.graphic(previousSymbolizer);
                Mark oldMark = SLDs.mark(previousSymbolizer);
                if (oldMark != null) {
                    // we apply the properties to all the new rules
                    List<Rule> rules = newFTS.rules();
                    for( Rule rule : rules ) {
                        String[] colors = SLDs.colors(rule);
                        Color fill = SLDs.toColor(colors[0]);

                        List<Symbolizer> newSymbolizers = rule.symbolizers();
                        for( Symbolizer newSymbolizer : newSymbolizers ) {
                            if (newSymbolizer instanceof PointSymbolizer) {
                                PointSymbolizer newPointSymbolizer = (PointSymbolizer) newSymbolizer;

                                Mark mark = sb.createMark(oldMark.getWellKnownName().evaluate(null, String.class));
                                Fill newFill = sb.createFill(fill);
                                newFill.setOpacity(ff.literal(opac));
                                mark.setFill(newFill);

                                Stroke newStroke = oldMark.getStroke();
                                if (newStroke != null) {
                                    if (borderColor!=null) {
                                        newStroke.setColor(ff.literal(borderColor));
                                        mark.setStroke(newStroke);
                                    }else{
                                        mark.setStroke(null);
                                    }
                                }

                                Graphic newGraphic = SLDs.graphic(newPointSymbolizer);
                                newGraphic.setSize(oldGraphic.getSize());
View Full Code Here

Examples of org.geotools.styling.Mark

        protected void encodePointStyle(SimpleFeature feature, Style2D style,
                PointSymbolizer symbolizer) {
            start("IconStyle");

            if (style instanceof MarkStyle2D) {
                Mark mark = SLD.mark(symbolizer);

                if (mark != null) {
                    double opacity = ((Number)mark.getFill().getOpacity().evaluate(feature)).doubleValue();

                    if (Double.isNaN(opacity)) {
                        // default to full opacity
                        opacity = 1.0;
                    }

                    if (mark.getFill() != null) {
                        final Color color = (Color)mark.getFill().getColor().evaluate(feature, Color.class);
                        encodeColor(color, opacity);
                    }
                }
            }
View Full Code Here

Examples of org.geotools.styling.Mark

            if ((pointSym.getGraphic() != null)
                    && (pointSym.getGraphic().getMarks() != null)) {
                Mark[] marks = pointSym.getGraphic().getMarks();

                if ((marks.length > 0) && (marks[0] != null)) {
                    Mark mark = marks[0];

                    int opacity = 255;

                    if (mark.getFill().getOpacity() != null) {
                        float op = getOpacity(mark.getFill().getOpacity());
                        opacity = (new Float(255 * op)).intValue();
                    }

                    Paint p = ((MarkStyle2D) style).getFill();

View Full Code Here

Examples of org.geotools.styling.Mark

         */
             
        protected void processSymbolizer(SimpleFeature ft, Rule rule,Symbolizer symbolizer) throws IOException{
          super.processSymbolizer(ft, rule,symbolizer);
          if(symbolizer instanceof PointSymbolizer) {
            Mark mark=SLD.mark((PointSymbolizer)symbolizer);
            if(mark!=null) {
              size=SLD.size(mark);
              asCircle=SLD.wellKnownName(mark).toLowerCase().equals("circle");
              if(!asCircle)
                symbol=SLD.wellKnownName(mark).toLowerCase();
View Full Code Here

Examples of org.idpf.epubcheck.util.css.CssReader.Mark

    reader.next(); // '*'

    while (true)
    {
      Mark mark = reader.mark();
      int ch = reader.next();
      if (ch == -1)
      {
        builder.error(SCANNER_PREMATURE_EOF, reader);
        reader.unread(ch, mark);
View Full Code Here

Examples of org.opengis.style.Mark

        // check the rail
        ls = (LineSymbolizer) collector.symbolizers.get(1);
        Graphic graphic = ls.getStroke().getGraphicStroke();
        List<GraphicalSymbol> symbols = graphic.graphicalSymbols();
        assertEquals(1, symbols.size());
        Mark mark = (Mark) symbols.get(0);
        assertEquals("shape://vertline", mark.getWellKnownName().evaluate(null));
        assertEquals("#333333", mark.getStroke().getColor().evaluate(null, String.class));
        assertEquals(1, (int) mark.getStroke().getWidth().evaluate(null, Integer.class));
    }
View Full Code Here

Examples of org.yaml.snakeyaml.error.Mark

        RubyKernel.raise(context, runtime.getKernel(), new IRubyObject[] { exception }, Block.NULL_BLOCK);
    }

    private static void raiseParserException(ThreadContext context, IRubyObject yaml, MarkedYAMLException mye, IRubyObject rbPath) {
        Ruby runtime;
        Mark mark;
        RubyClass se;
        IRubyObject exception;

        runtime = context.runtime;
        se = (RubyClass)runtime.getModule("Psych").getConstant("SyntaxError");

        mark = mye.getProblemMark();

        exception = se.newInstance(context,
                new IRubyObject[] {
                    rbPath,
                    runtime.newFixnum(mark.getLine() + 1),
                    runtime.newFixnum(mark.getColumn() + 1),
                    runtime.newFixnum(mark.getIndex()),
                    (null == mye.getProblem() ? runtime.getNil() : runtime.newString(mye.getProblem())),
                    (null == mye.getContext() ? runtime.getNil() : runtime.newString(mye.getContext()))
                },
                Block.NULL_BLOCK);
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.