} else if (res.equalsIgnoreCase("dashoffset") || res.equalsIgnoreCase("stroke-dashoffset")) { stroke.setDashOffset(parseCssParameter(child));
public Stroke getDefaultStroke() { try { Stroke stroke = createStroke( filterFactory.literal("#000000"), filterFactory.literal(Integer.valueOf(1))); stroke.setDashOffset(filterFactory.literal(Integer.valueOf(0))); stroke.setDashArray(Stroke.DEFAULT.getDashArray()); stroke.setLineCap(filterFactory.literal("butt")); stroke.setLineJoin(filterFactory.literal("miter")); stroke.setOpacity(filterFactory.literal(Integer.valueOf(1))); return stroke; } catch (org.geotools.filter.IllegalFilterException ife) { // we should never be in here throw new RuntimeException("Error creating stroke", ife); } }
public void visit(Stroke stroke) { Stroke copy = sf.getDefaultStroke(); copy.setColor(copy(stroke.getColor())); copy.setDashArray(copyExpressions(stroke.dashArray())); copy.setDashOffset(copy(stroke.getDashOffset())); copy.setGraphicFill(copy(stroke.getGraphicFill())); copy.setGraphicStroke(copy(stroke.getGraphicStroke())); copy.setLineCap(copy(stroke.getLineCap())); copy.setLineJoin(copy(stroke.getLineJoin())); copy.setOpacity(copy(stroke.getOpacity())); copy.setWidth(copy(stroke.getWidth())); if (STRICT && !copy.equals(stroke)) { throw new IllegalStateException("Was unable to duplicate provided Stroke:" + stroke); } pages.push(copy); }
/** * Used to rescaleDashArray the provided stroke. * * @param stroke the unscaled stroke, which will be modified in-place. * @param mapScale the mapScale in pixels per meter. * @param uom the unit of measure that will be used to scale. */ protected void rescaleStroke(Stroke stroke, Unit<Length> uom) { if (stroke != null) { stroke.setWidth(rescale(stroke.getWidth(), uom)); stroke.setDashArray(rescaleDashArray(stroke.dashArray(), uom)); stroke.setDashOffset(rescale(stroke.getDashOffset(), uom)); rescale(stroke.getGraphicFill(), uom); rescale(stroke.getGraphicStroke(), uom); } }
/** * Increase stroke width. * * <p>Based on feedback we may need to change the dash array as well. * * <p> */ public void visit(org.geotools.styling.Stroke stroke) { Stroke copy = sf.getDefaultStroke(); copy.setColor(copy(stroke.getColor())); copy.setDashArray(rescaleDashArray(stroke.dashArray())); copy.setDashOffset(rescale(stroke.getDashOffset())); copy.setGraphicFill(copy(stroke.getGraphicFill())); copy.setGraphicStroke(copy(stroke.getGraphicStroke())); copy.setLineCap(copy(stroke.getLineCap())); copy.setLineJoin(copy(stroke.getLineJoin())); copy.setOpacity(copy(stroke.getOpacity())); copy.setWidth(rescale(stroke.getWidth())); pages.push(copy); }
stroke.setDashOffset(dashOffset); stroke.setGraphicFill(graphicFill); stroke.setGraphicStroke(graphicStroke);
stroke.setDashOffset(parseCssParameter(child));
stroke.setDashOffset(parseCssParameter(child));
stroke().setDashOffset(Util.expression(map.str("stroke-dashoffset"), factory));
public Stroke getDefaultStroke() { try { Stroke stroke = createStroke(filterFactory.literal( "#000000"), filterFactory.literal(new Integer(1))); stroke.setDashOffset(filterFactory.literal( new Integer(0))); stroke.setLineCap(filterFactory.literal("butt")); stroke.setLineJoin(filterFactory.literal("miter")); stroke.setOpacity(filterFactory.literal( new Integer(1))); return stroke; } catch (org.geotools.filter.IllegalFilterException ife) { //we should never be in here throw new RuntimeException("Error creating stroke", ife); } }
public Stroke getDefaultStroke() { try { Stroke stroke = createStroke(filterFactory.literal("#000000"), filterFactory.literal(new Integer(1))); stroke.setDashOffset(filterFactory.literal( new Integer(0))); stroke.setDashArray(Stroke.DEFAULT.getDashArray()); stroke.setLineCap(filterFactory.literal("butt")); stroke.setLineJoin(filterFactory.literal("miter")); stroke.setOpacity(filterFactory.literal(new Integer(1))); return stroke; } catch (org.geotools.filter.IllegalFilterException ife) { //we should never be in here throw new RuntimeException("Error creating stroke", ife); } }
@Override public void visit(Stroke stroke) { super.visit(stroke); Stroke copy = (Stroke) pages.peek(); if (copy.getGraphicFill() != null) { copy.setGraphicFill(null); } if (copy.getGraphicStroke() != null) { copy.setWidth(getSymbolsSize(copy.getGraphicStroke())); copy.setGraphicStroke(null); } copy.setColor(colorFunction); copy.setOpacity(LITERAL_ONE); if (copy.dashArray() != null) { copy.dashArray().clear(); } copy.setDashOffset(null); }
public void apply(){ if(stroke != null){ stroke.setLineCap(GuiStrokeLineCap.getLineCap()); stroke.setLineJoin(GuiStrokeLineJoin.getLineJoin()); stroke.setDashArray(GuiStrokeDashes.getDashes()); stroke.setDashOffset(GuiStrokeDashes.getOffset()); stroke.setOpacity(GuiStrokeAlpha.getExpression()); stroke.setWidth(GuiStrokeWidth.getExpression()); stroke.setColor(GuiStrokeColor.getExpression()); } }
public void visit(Stroke stroke) { Stroke copy = sf.getDefaultStroke(); copy.setColor( copy(stroke.getColor())); copy.setDashArray( copy(stroke.getDashArray())); copy.setDashOffset( copy( stroke.getDashOffset())); copy.setGraphicFill( copy(stroke.getGraphicFill())); copy.setGraphicStroke( copy( stroke.getGraphicStroke())); copy.setLineCap(copy(stroke.getLineCap())); copy.setLineJoin( copy(stroke.getLineJoin())); copy.setOpacity( copy(stroke.getOpacity())); copy.setWidth( copy(stroke.getWidth())); if( STRICT && !copy.equals( stroke)){ throw new IllegalStateException("Was unable to duplicate provided Stroke:"+stroke ); } pages.push(copy); }
/** * Used to rescale the provided stroke. * * @param stroke * the unscaled stroke, which will be modified in-place. * @param mapScale * the mapScale in pixels per meter. * @param uom * the unit of measure that will be used to scale. */ protected void rescaleStroke(Stroke stroke, double mapScale, Unit<Length> uom) { if (stroke != null) { stroke.setWidth(rescale(stroke.getWidth(), mapScale, uom)); stroke.setDashArray(rescale(stroke.getDashArray(), mapScale, uom)); stroke.setDashOffset(rescale(stroke.getDashOffset(), mapScale, uom)); rescale(stroke.getGraphicFill(), mapScale, uom); rescale(stroke.getGraphicStroke(), mapScale, uom); } }
/** * Increase stroke width. * <p> * Based on feedback we may need to change the dash array as well. * <p> */ public void visit(org.geotools.styling.Stroke stroke) { Stroke copy = sf.getDefaultStroke(); copy.setColor( copy(stroke.getColor())); copy.setDashArray( rescale(stroke.getDashArray())); copy.setDashOffset( rescale(stroke.getDashOffset())); copy.setGraphicFill( copy(stroke.getGraphicFill())); copy.setGraphicStroke( copy( stroke.getGraphicStroke())); copy.setLineCap(copy(stroke.getLineCap())); copy.setLineJoin( copy(stroke.getLineJoin())); copy.setOpacity( copy(stroke.getOpacity())); copy.setWidth( rescale(stroke.getWidth())); pages.push(copy); }
stroke.setDashOffset(dashOffset); stroke.setGraphicFill(graphicFill); stroke.setGraphicStroke(graphicStroke);
stroke.setDashOffset(dashOffset); stroke.setGraphicFill(graphicFill); stroke.setGraphicStroke(graphicStroke);
stroke().setDashOffset(Util.expression(map.str("stroke-dashoffset"), factory));