/** * create a stroke with color, width, linejoin type and lineCap type. * * @param color the color of the line * @param width the width of the line * @param lineJoin the type of join to be used at points along the line * @param lineCap the type of cap to be used at the end of the line * @return the stroke created */ public Stroke createStroke(Color color, double width, String lineJoin, String lineCap) { Stroke stroke = createStroke(color, width); stroke.setLineJoin(literalExpression(lineJoin)); stroke.setLineCap(literalExpression(lineCap)); return stroke; }
|| res.equalsIgnoreCase("stroke-linecap")) { stroke.setLineCap(parseCssParameter(child)); } else if (res.equalsIgnoreCase("linejoin") || res.equalsIgnoreCase("stroke-linejoin")) {
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); }
/** * 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.setLineCap(lineCap); stroke.setDashArray(dashArray); stroke.setDashOffset(dashOffset);
stroke.setLineCap(parseCssParameter(child));
|| res.equalsIgnoreCase("stroke-linecap")) { stroke.setLineCap(parseCssParameter(child)); } else if (res.equalsIgnoreCase("linejoin") || res.equalsIgnoreCase("stroke-linejoin")) {
/** * create a stroke with color, width, linejoin type and lineCap type. * * @param color the color of the line * @param width the width of the line * @param lineJoin the type of join to be used at points along the line * @param lineCap the type of cap to be used at the end of the line * * @return the stroke created */ public Stroke createStroke(Color color, double width, String lineJoin, String lineCap) { Stroke stroke = createStroke(color, width); stroke.setLineJoin(literalExpression(lineJoin)); stroke.setLineCap(literalExpression(lineCap)); return stroke; }
/** * create a stroke with color, width, linejoin type and lineCap type. * * @param color the color of the line * @param width the width of the line * @param lineJoin the type of join to be used at points along the line * @param lineCap the type of cap to be used at the end of the line * * @return the stroke created */ public Stroke createStroke(Color color, double width, String lineJoin, String lineCap) { Stroke stroke = createStroke(color, width); stroke.setLineJoin(literalExpression(lineJoin)); stroke.setLineCap(literalExpression(lineCap)); return stroke; }
stroke().setLineCap(Util.expression(map.str("stroke-linecap"), 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); } }
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); }
/** * 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.setLineCap(lineCap); stroke.setDashArray(dashArray); stroke.setDashOffset(dashOffset);
stroke.setLineCap(lineCap); stroke.setDashArray(dashArray); stroke.setDashOffset(dashOffset);
stroke().setLineCap(Util.expression(map.str("stroke-linecap"), factory));