[whatwg] CSS Filter Effects for Canvas 2D Context

Rik Cabanier cabanier at gmail.com
Sat Jul 28 16:27:27 PDT 2012


On Sat, Jul 28, 2012 at 1:58 PM, Ashley Gullen <ashley at 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?



More information about the whatwg mailing list