[whatwg] Enabling LCD Text and antialiasing in canvas

Boris Zbarsky bzbarsky at MIT.EDU
Thu Mar 14 07:38:58 PDT 2013


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



More information about the whatwg mailing list