/** * Sets the line-cap style. * * @param lineCap the line cap style as a {@link LineCap} value * @see #getLineCap() */ public final void setLineCap(LineCap lineCap) { setLineCap(lineCap.getValue()); }
@Override public Canvas setLineCap(LineCap cap) { ctx.setLineCap(convertLineCap(cap)); return this; }
/** * Sets the line-cap style. * * @param lineCap the line cap style as a {@link LineCap} value * @see #getLineCap() */ public final void setLineCap(LineCap lineCap) { setLineCap(lineCap.getValue()); }
/** * Sets the line-cap style. * * @param lineCap the line cap style as a {@link LineCap} value * @see #getLineCap() */ public final void setLineCap(LineCap lineCap) { setLineCap(lineCap.getValue()); }
@Override public Canvas setLineCap(LineCap cap) { ctx.setLineCap(convertLineCap(cap)); return this; }
@Override public Canvas setLineCap(LineCap cap) { ctx.setLineCap(convertLineCap(cap)); return this; }
protected void appendPath(Context2d ctx, PathSprite sprite) { ctx.beginPath(); sprite.toAbsolute(); // sprite = sprite.copy().toCurve(); PrecisePoint currentPoint = new PrecisePoint(); PrecisePoint movePoint = new PrecisePoint(); PrecisePoint curvePoint = new PrecisePoint(); PrecisePoint quadraticPoint = new PrecisePoint(); appendPathCommands(ctx, sprite.getCommands(), currentPoint, movePoint, curvePoint, quadraticPoint); double opacity = Double.isNaN(sprite.getOpacity()) ? 1.0 : sprite.getOpacity(); if (sprite.getFill() != null && sprite.getFill() != Color.NONE) { ctx.setGlobalAlpha(Double.isNaN(sprite.getFillOpacity()) ? opacity : opacity * sprite.getFillOpacity()); ctx.fill(); } if (sprite.getStroke() != null && sprite.getStroke() != Color.NONE && sprite.getStrokeWidth() != 0) { ctx.setLineCap(sprite.getStrokeLineCap() == null ? LineCap.BUTT : sprite.getStrokeLineCap()); ctx.setLineJoin(sprite.getStrokeLineJoin() == null ? LineJoin.MITER : sprite.getStrokeLineJoin()); ctx.setMiterLimit(sprite.getMiterLimit() == Double.NaN ? 4 : sprite.getMiterLimit()); ctx.setGlobalAlpha(Double.isNaN(sprite.getStrokeOpacity()) ? opacity : opacity * sprite.getStrokeOpacity()); ctx.stroke(); } }