W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] canvas colors/gradients/patterns

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 18 Aug 2004 02:03:34 +0000 (UTC)
Message-ID: <Pine.LNX.4.61.0408180143020.22355@dhalsim.dreamhost.com>
On Tue, 17 Aug 2004, Stuart Parmenter wrote:
>
> fillColor and strokeColor should go away in favor of the following:
> 
>     fillStyle = colorspec | gradient | pattern
>     strokeStyle = colorspec | gradient | pattern
> 
>     gradient = context.createLinearGradient (startX, startY, endX, endY)
>     gradient = context.createRadialGradient (startX, startY, startRadius,
> endX, endY, endRadius);
>     gradient.addColorStop (offset, colorspec);
> 
>     pattern = context.createPattern (url(), repeat | repeat-x | repeat-y |
> no-repeat)

Done.

   http://whatwg.org/specs/web-apps/current-work/#graphics

There were some things I wasn't sure about, so I used the Quartz API as a 
reference where I could, and made reasonably sensible stuff up for 
everything else.

Let me know what needs changing.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 17 August 2004 19:03:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC