MRchildNEO / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

‘stroke-linecap’ defaults to 'round', should be 'butt' #575

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
As far as I can see, stroke-linecap is not yet implemented.

There can be substantial rendering differences between native SVG and the Flash 
renderer since the SVG 1.1. spec sets the default stroke-linecap to 'butt' 
whereas SVG Web defaults to 'rounded':

http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty

a reduced test-case can be found at

http://vis.uell.net/gsvg/linecap.html
http://vis.uell.net/gsvg/linecap.html?svg.render.forceflash=true

which displays the following

<g stroke-width="15" stroke="green">
<line x1="30"  y1="300" x2="90"  y2="100" />
<line x1="90"  y1="300" x2="150" y2="100" stroke-linecap="round" />
<line x1="150" y1="300" x2="210" y2="100" stroke-linecap="square" />
<line x1="210" y1="300" x2="270" y2="100" stroke-linecap="butt" />
</g>

a reference rendering is attached

This affects not only the line but also the path element.

Original issue reported on code.google.com by mneu...@gmail.com on 20 Nov 2010 at 10:24

Attachments:

GoogleCodeExporter commented 8 years ago
Flash does not seem to honor the capsStyle we are passing to it. Strange. Not 
sure what we can do to fix this...
You can try the different stroke-linejoin settings instead which seem to affect 
the line caps as well.

Original comment by grick23@gmail.com on 29 Nov 2010 at 4:48

GoogleCodeExporter commented 8 years ago
The "stroke-linejoin settings" did the trick, perfect workaround for me, thanks 
Rick.

Original comment by mneu...@gmail.com on 29 Nov 2010 at 6:45

GoogleCodeExporter commented 8 years ago
We actually changed the default for the stroke-linecap setting in SVG Web; the 
default rounded version was very slow on Flash for some reason.

Original comment by bradneub...@gmail.com on 4 Dec 2010 at 1:30