W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2012

Re: [css-compositing] blending in canvas

From: Rik Cabanier <cabanier@gmail.com>
Date: Wed, 14 Nov 2012 10:48:33 -0800
Message-ID: <CAGN7qDBhh2oCG74h=Hcyd6gvV2Ucdz_+_NK0OhjNn8noh-Lztg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "public-fx@w3.org" <public-fx@w3.org>
Good point!

They are just strings, so we can later define it so you can say:
mycontext.globalCompositeOperator = "multiply,source-atop"

On Wed, Nov 14, 2012 at 9:04 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Wed, Nov 14, 2012 at 8:45 AM, Rik Cabanier <cabanier@gmail.com> wrote:
> > the Compositing and Blending spec has a chapter on adding blending to the
> > Canvas 2d context [1].
> > Blending is currently defined by overloading the
> 'globalCompositeOperator'
> > [2] with additional values.
> >
> > People have raised this as an issue because CSS split compositing and
> > blending into 2 properties and collapsing them for Canvas seems
> > inconsistent.
> > The main reason for this difference, is that Canvas is built upon Core
> > Graphics on the hood and this API set can't implement compositing and
> > blending separately. Because of this, splitting the properties can cause
> > combinations that are not implementable (ie source-atop + multiply).
> >
> >
> > What do people think?
> > Is it more important for the spec to be consistent, or to have a feature
> > that can be consistently implemented today?
>
> I'm fine with the current proposal.  In the future, if it becomes more
> palatable to mix arbitrary compositing and blending, we can simply
> change the attribute to accept up to two keywords, one from the
> compositing list and one from the blending list.
>
> ~TJ
>
Received on Wednesday, 14 November 2012 18:49:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 14 November 2012 18:49:01 GMT