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

Re: [whatwg] CSS Filter Effects for Canvas 2D Context

From: Rik Cabanier <cabanier@gmail.com>
Date: Sat, 28 Jul 2012 16:27:27 -0700
Message-ID: <CAGN7qDBaW9nG_0tXDLxT_TrXQTVaTJdkBcTpZXauEyECW59+cA@mail.gmail.com>
To: Ashley Gullen <ashley@scirra.com>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>, David Geary <david.mark.geary@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Chris Marrin <cmarrin@apple.com>, Ronald Jett <rjett@level-studios.com>
On Sat, Jul 28, 2012 at 1:58 PM, Ashley Gullen <ashley@scirra.com> wrote:

> On another note, wouldn't it be nice if you could add a grouping operator
>> such as this:
>>
>> gamecanvascontext.filter = '...';
>> gamecanvascontext.beginGroup();
>> ... // lots of drawing operators
>> gamecanvascontext.endGroup();
>>
>>  and have everything in that group at endGroup time?
>>
>
>  Do you mean applying an effect to multiple draw operations?
>

True, but you would have to know the size of the offscreen canvas which is
sometimes hard.
I'm unsure what happens if you scale or rotate that offscreen canvas. Will
the artwork and text antialias correctly? How does the up/downsampling
happen?


> Usually that is achieved with rendering to an offscreen canvas, then
> rendering that with the effect.
>

True, but you would have to know the size of the offscreen canvas which is
sometimes hard.
I'm unsure what happens if you scale or rotate that offscreen canvas. Will
the artwork and text antialias correctly? How does the up/downsampling
happen?
Received on Saturday, 28 July 2012 23:27:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT