Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-09-21 Thread Ian Hickson
On Fri, 24 Jun 2011, Robert O'Callahan wrote: Consider this testcase: http://people.mozilla.org/~roc/SingularCanvasMatrix.html It sets up a rectangle to fill, then sets the current matrix to a singular matrix (yy=0 in this case), then fills with different fillStyles. It's not clear from the

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-28 Thread Tab Atkins Jr.
On Sun, Jun 26, 2011 at 5:18 PM, Robert O'Callahan rob...@ocallahan.org wrote: Gradients already aren't continuous where the start and end points are equal. I think it would be OK to draw nothing as Aryeh suggests. At least it's easy to spec and implement, and I doubt authors will care (they

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-28 Thread Robert O'Callahan
On Wed, Jun 29, 2011 at 6:19 AM, Tab Atkins Jr. jackalm...@gmail.comwrote: On Sun, Jun 26, 2011 at 5:18 PM, Robert O'Callahan rob...@ocallahan.org wrote: Gradients already aren't continuous where the start and end points are equal. I think it would be OK to draw nothing as Aryeh suggests.

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-26 Thread Aryeh Gregor
On Fri, Jun 24, 2011 at 10:52 PM, Robert O'Callahan rob...@ocallahan.org wrote: That's true if you call fillRect(), or fill() on a path that you've emitted while the current matrix is singular; the rectangle or path collapses to a single point (or line). I think it's completely clear browsers

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-26 Thread Boris Zbarsky
On 6/26/11 6:14 PM, Aryeh Gregor wrote: So this is probably my pure math background showing through rather than a very useful contribution to the discussion. If the API were designed for mathematicians, now . . . The argument could still be made that we want behavior to be continuous

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-26 Thread Robert O'Callahan
Gradients already aren't continuous where the start and end points are equal. I think it would be OK to draw nothing as Aryeh suggests. At least it's easy to spec and implement, and I doubt authors will care (they haven't cared about the browser behaviors so far AFAIK).

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-26 Thread Boris Zbarsky
On 6/26/11 8:18 PM, Robert O'Callahan wrote: Gradients already aren't continuous where the start and end points are equal. I think it would be OK to draw nothing as Aryeh suggests. At least it's easy to spec and implement, and I doubt authors will care (they haven't cared about the browser

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-26 Thread Robert O'Callahan
On Mon, Jun 27, 2011 at 2:11 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/26/11 8:18 PM, Robert O'Callahan wrote: Gradients already aren't continuous where the start and end points are equal. I think it would be OK to draw nothing as Aryeh suggests. At least it's easy to spec and

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-25 Thread Tab Atkins Jr.
On Fri, Jun 24, 2011 at 8:00 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Sat, Jun 25, 2011 at 5:38 AM, Aryeh Gregor simetrical+...@gmail.comwrote: If you define different behavior for solid colors or gradients, doesn't that mean that they'll behave differently from if you used an

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-24 Thread Aryeh Gregor
On Fri, Jun 24, 2011 at 1:09 AM, Robert O'Callahan rob...@ocallahan.org wrote: Consider this testcase: http://people.mozilla.org/~roc/SingularCanvasMatrix.html It sets up a rectangle to fill, then sets the current matrix to a singular matrix (yy=0 in this case), then fills with different

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-24 Thread Robert O'Callahan
On Sat, Jun 25, 2011 at 5:38 AM, Aryeh Gregor simetrical+...@gmail.comwrote: I'm not familiar enough with the canvas API to have an informed opinion on what should happen here, but mathematically it makes sense to me that nothing should be drawn ever if the transform matrix is singular.

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-24 Thread Robert O'Callahan
On Sat, Jun 25, 2011 at 5:38 AM, Aryeh Gregor simetrical+...@gmail.comwrote: If you define different behavior for solid colors or gradients, doesn't that mean that they'll behave differently from if you used an image that looked exactly the same? That seems bad. If you set up a path

[whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-23 Thread Robert O'Callahan
Consider this testcase: http://people.mozilla.org/~roc/SingularCanvasMatrix.html It sets up a rectangle to fill, then sets the current matrix to a singular matrix (yy=0 in this case), then fills with different fillStyles. It's not clear from the spec how this is supposed to behave, and there's not

Re: [whatwg] canvas drawing with singular transforms and zero-sized gradients

2011-06-23 Thread Robert O'Callahan
PS, ignore the zero-sized gradients part of the subject. Sorry. Rob -- If we claim to be without sin, we deceive ourselves and the truth is not in us. If we confess our sins, he is faithful and just and will forgive us our sins and purify us from all unrighteousness. If we claim we have not