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

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 UTC