Stroke-miterlimit handling

I apologize if this has come up before, but I can't seem to find any
record of it.

Synopsis: Different browsers treat stroke-miterlimit differently (at
least on Windows 7).

IE 9 and Chrome 26 appear to follow the letter of the spec (which looks
like it was derived from PostScript behavior). Unfortunately, this leads
to an abrupt discontinuity in the appearance of a line join as its angle
crosses the miter limit threshold.

Firefox 20, on the other hand, uses a different formula, one which
appears to be similar to that used by Windows Presentation Foundation.
Although its behavior doesn't follow the spec, it at least avoids the
discontinuity.

So, two questions:

1) Has this ever been discussed here before?

2) Assuming that the answer to (1) is yes, and since the Firefox
behavior is "nicer" in some sense, has there been any talk of allowing
the Firefox behavior as an alternative, perhaps via an additional
stroke-XYZ attribute?

You can see the browser differences in the following two test suite
images:

http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/painting-stroke-03-t.html
http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/painting-stroke-07-t.html

And you can see an animation of the discontinuity by viewing the simple
SVG image below.

-Steve Schafer

--------8<--------

<?xml version="1.0" encoding="iso-8859-1" ?>
<svg
  viewBox='0 0 1000 1000'
  xmlns='http://www.w3.org/2000/svg'
  height='500px'
  width='500px'
  version='1.1'
  xmlns:xlink='http://www.w3.org/1999/xlink'>
  <title>stroke-miterlimit demo</title>
  <path
    stroke='blue'
    id='mitered'
    fill='none'
    stroke-width='20'
    d='M 100 100  400 100  100 150'/>
  <animate
    xlink:href='#mitered'
    values='M 100 100  400 100  100 400;M 100 100  400 100  100 150'
    stroke='blue'
    dur='2s'
    fill='none'
    attributeType='XML'
    stroke-width='20'
    attributeName='d'/>
</svg>

-------->8--------

Received on Thursday, 9 May 2013 22:08:25 UTC