- From: Philip Taylor <excors+whatwg@gmail.com>
- Date: Fri, 16 Oct 2009 16:01:41 +0100
On Fri, Oct 16, 2009 at 2:25 PM, Robert O'Callahan <robert at ocallahan.org> wrote: > On Sat, Oct 17, 2009 at 1:06 AM, Philip Taylor <excors+whatwg at gmail.com> > wrote: >> >> I think the spec is clear on this (at least when I last looked; not >> sure if it's changed since then). Image A is infinite and filled with >> transparent black, then you draw the shape onto it (with no >> compositing yet), and then you composite the whole of image A (using >> globalCompositeOperation) on top of the current canvas bitmap. With >> some composite operations that's a different result than if you only >> composited pixels within the extent of the shapes you drew onto image >> A. > > > Ah, so you mean Firefox is right in this case? Yes, mostly. http://philip.html5.org/tests/canvas/suite/tests/index.2d.composite.uncovered.html has relevant tests, matching what I believed the spec said - on Windows, Opera 10 passes them all, Firefox 3.5 passes all except 'copy' (https://bugzilla.mozilla.org/show_bug.cgi?id=366283), Safari 4 and Chrome 3 fail them all. (Looking at the spec quickly now, I don't see anything that actually states this explicitly - the only reference to infinite transparent black bitmaps is when drawing shadows. But http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#drawing-model is phrased in terms of rendering shapes onto an image, then compositing the image within the clipping region, so I believe it is meant to work as I said (and definitely not by compositing only within the extent of the shape drawn onto the image).) -- Philip Taylor excors at gmail.com
Received on Friday, 16 October 2009 08:01:41 UTC