-
Type:
Bug
-
Status: Resolved
-
Resolution: Fixed
-
Affects Version/s: 1.5
-
Fix Version/s: None
-
Component/s: (RFE) Request For Extension
-
Labels:None
-
Environment:Operating System: other
Platform: Other
SVG 1.0 specification : "A zero value causes no stroke to be painted."
Right now, a stroke is still painted.
http://www.w3.org/TR/SVG/painting.html#StrokeWidthProperty
Here is the modifications I suggest for org.apache.batik.bridge.PaintServer :
/**
- Converts for the specified element, its stroke paint properties
- to a Paint object.
* - @param strokedElement the element interested in a Paint
- @param strokedNode the graphics node to stroke
- @param ctx the bridge context
*/
public static Paint convertStrokePaint(Element strokedElement,
GraphicsNode strokedNode,
BridgeContext ctx) {
Value v;
> v = CSSUtilities.getComputedStyle
> (strokedElement, SVGCSSEngine.STROKE_WIDTH_INDEX);
> float width = v.getFloatValue();
>
> if( width == 0.0f ) { > //stop here no stroke should be painted > return null; > }
v = CSSUtilities.getComputedStyle
(strokedElement, SVGCSSEngine.STROKE_OPACITY_INDEX);
float opacity = convertOpacity(v);
v = CSSUtilities.getComputedStyle
(strokedElement, SVGCSSEngine.STROKE_INDEX);
return convertPaint(strokedElement,
strokedNode,
v,
opacity,
ctx);
}