W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: 3.14.11. The canvas element

From: Ben Boyle <benjamins.boyle@gmail.com>
Date: Mon, 6 Aug 2007 20:38:37 +1000
Message-ID: <5f37426b0708060338q743c710aw97c3032110fd7cee@mail.gmail.com>
To: "Philip Taylor" <philip@zaynar.demon.co.uk>
Cc: "HTML WG" <public-html@w3.org>

Thanks for the clarification - much appreciated!
Worth adding to the spec as a note I think.


On 8/6/07, Philip Taylor <philip@zaynar.demon.co.uk> wrote:
> Ben Boyle wrote:
> > [quoting from the spec] The canvas must initially be fully transparent black.
>
> I think that sentence should be modified to say "The canvas bitmap must
> initially be fully transparent black.", so it's clear that it applies to
> the bitmap rather than to the element itself.
>
> > 1. "transparent black" ? Transparent I understand. Why black?
>
> "Transparent black" means rgba(0, 0, 0, 0). A colour like rgba(255, 0,
> 255, 0) would be fully transparent too (but not black). Normally all
> fully transparent colours act indistinguishably, but you can call
> CanvasRenderingContext2D's getImageData() to see the difference between
> [0, 0, 0, 0] and [255, 0, 255, 0], so the distinction matters a bit
> here, and specifying "transparent black" ensures everyone implements the
> same.
>
> > This would be adjustable through CSS?
>
> You can't change the canvas bitmap with CSS. If you do <canvas
> style="background:red"> then the canvas is still initially a transparent
> black bitmap, though it's rendered on top of a red square (which is
> rendered on top of whatever's behind the canvas element). (I don't know
> whether the rendering is actually specified anywhere, but it's
> consistent with how <img> works.)
>
> --
> Philip Taylor
> philip@zaynar.demon.co.uk
>
Received on Monday, 6 August 2007 10:49:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:48 UTC