[whatwg] Canvas: clarification of compositing operations needed

On Wed, Jul 28, 2010 at 11:39 PM, David Flanagan
<david at davidflanagan.com> wrote:
> James Robinson wrote:
>> For example, I think
>> drawing a 20x20 image into a 500x500 canvas without scaling with a
>> globalCompositeOperation of 'copy' should result in only the 20x20 region
>> being cleared out, not the entire canvas.
>
> Yikes! ?It hadn't occurred to me that copy should behave that way. ?But
> you're right that that is what the spec requires. ?Opera does it that way.
> ?Firefox, thankfully, does not.
>
> Perhaps independently of the debate over infinite bitmap vs. shape extents,
> we can agree that "copy" is a special value that means "do not perform
> compositing"

That value already exists - it's called "source-over".  "copy" does
some special compositing stuff no matter whether you do "global" or
"local" compositing - try using 'copy' when the source has .1 opacity.

~TJ

Received on Thursday, 29 July 2010 09:36:08 UTC