W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Canvas performance issue: setting colors

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 04 Oct 2008 12:09:39 +0200
Message-ID: <op.uihvudbh64w2qv@annevk-t60.oslo.opera.com>
On Sat, 04 Oct 2008 02:55:36 +0200, Greg Houston  
<gregory.houston at gmail.com> wrote:
> Note that also like your example the Mootools color plugin does not
> have separate rgb and rgba methods. It is smart enough to recognize
> that if there is a fourth value in the array it refers to the alpha. I
> never quite grasped why there is both an rgb() and rgba() in canvas.
> It seems like rgb is all that would have been necessary, and if a
> fourth value is passed it obviously refers to the alpha.

That's because canvas "simply" takes a CSS <color> value.

Anne van Kesteren
Received on Saturday, 4 October 2008 03:09:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC