[whatwg] canvas colors/gradients/patterns

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