W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

Re: [whatwg] Enabling LCD Text and antialiasing in canvas

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 14 Mar 2013 10:38:58 -0400
Message-ID: <5141E102.2000001@mit.edu>
To: whatwg@lists.whatwg.org
On 3/14/13 10:34 AM, Stephen White wrote:
> can we create a
>
> interface Canvas2DContextAttributes {
>    attribute boolean alpha;
> }
>
> which has no relation to WebGLContextAttributes?

Yes.

> Then we get at least the "duck typing" such that
>
> ctx = canvas.getContext('2d', {alpha: false });
>
> and
>
> ctx = canvas.getContext('webgl', {alpha: false });
>
> both work, although one is coerced into a WebGLContextAttributes and the
> other to a Canvas2DContextAttributes.

And this would work, yes.

-Boris
Received on Thursday, 14 March 2013 14:39:29 GMT

This archive was generated by hypermail 2.3.1 : Thursday, 14 March 2013 14:39:30 GMT