Re: [whatwg] canvas miterLimit property

2012-09-20 Thread Michael Day
Hi Ian, The main thing driving this API is back-compat with canvas implementations, not consistency with SVG. :-) As always, whatever random crap gets implemented first becomes the official standard we have to support forever in the name of backwards compatibility because it already has a fe

Re: [whatwg] canvas miterLimit property

2012-09-20 Thread Ian Hickson
On Fri, 21 Sep 2012, Michael Day wrote: > > > > Its trivial to treat numbers 0.0 < q <= 1.0 as 1.0. No need to fail. > > Browsers (at least Opera, Safari, Firefox, and Chrome) consistently > > follow the spec here. > > Yes, we can clamp it to 1.0 when we generate the PDF, just wanted to > poin

Re: [whatwg] canvas miterLimit property

2012-09-20 Thread Michael Day
Hi Ian, In Prince we are clamping it to 1.0, as the PDF spec is consistent with SVG this time, and Adobe Reader will fail if the miter limit is dropped below 1.0. What do you mean by fail? I mean if you try to set the miter limit to a number less than 1.0 in a PDF page content stream Adobe

Re: [whatwg] canvas miterLimit property

2012-09-20 Thread Ian Hickson
On Tue, 11 Sep 2012, Michael Day wrote: > > The canvas miterLimit property has a default value of 10, while the SVG > stroke-miterlimit property has a default value of 4. Is there a reason > for this inconsistency? It's what Apple implemented when they invented . > For reference, the PDF rend

Re: [whatwg] canvas miterLimit property

2012-09-11 Thread Michael Day
Hi Rik, I'm unsure why SVG is different. While we are on the subject, in SVG stroke-miterlimit must be >= 1.0, whereas in the canvas it must be >= 0.0. In Prince we are clamping it to 1.0, as the PDF spec is consistent with SVG this time, and Adobe Reader will fail if the miter limit is dr

Re: [whatwg] canvas miterLimit property

2012-09-11 Thread Rik Cabanier
Good catch! I'm unsure why SVG is different. This is a problem with the new Path object [1] that takes an SVG path string. A user will have to remember to set the miter limit to the SVG default otherwise the path might render differently in Canvas. If we ever harmonize the path object so it can be

[whatwg] canvas miterLimit property

2012-09-11 Thread Michael Day
Hi, The canvas miterLimit property has a default value of 10, while the SVG stroke-miterlimit property has a default value of 4. Is there a reason for this inconsistency? For reference, the PDF rendering model also has a default value of 10 for miterLimit, making SVG apparently the odd one o