W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2010

[whatwg] Canvas: clarification of compositing operations needed

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 29 Jul 2010 09:36:08 -0700
Message-ID: <AANLkTinteoeyz0ho0BL2D5j7HEtCnLqx8oTpzkXX2dGV@mail.gmail.com>
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.

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:25 UTC