W3C home > Mailing lists > Public > public-html@w3.org > June 2008

Re: Canvas gradient comments

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 13 Jun 2008 08:24:11 +0000 (UTC)
To: Philip Taylor <pjt47@cam.ac.uk>
Cc: HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0806130749120.8559@hixie.dreamhostps.com>
On Wed, 7 May 2008, Philip Taylor wrote:
> 
> "The createLinearGradient(x0, y0, x1, y1) method takes four arguments 
> that, after being subjected to the current transformation matrix, 
> represent the start point (x0, y0) and end point (x1, y1) of the 
> gradient." - that doesn't match reality. All implementations use the CTM 
> at fill/stroke time, not at create(Linear|Radial)Gradient time.

Fixed.


> The behaviour outside the 0/1 stops is specified redundantly. The 
> CanvasGradient bit says "Before the first stop, the color must be the 
> color of the first stop". (That's not limited to the range [0, 1], as I 
> read it). createLinearGradient says "at and before the starting point on 
> the canvas the color at offset 0 is used". createRadialGradient says 
> "Let the color at ω be the color of the gradient at offset 0.0 for all 
> values of ω less than 0.0". Since linear and radial gradients have the 
> same behaviour, it seems sensible to keep the CanvasGradient definition 
> (and maybe be clear that it's not limited to [0, 1]) and delete the 
> other two.

Fixed.


> "When there are no stops, the gradient is transparent black." - should 
> say "must be".

Nah, that's a definition, not a requirement. The requirement is in the 
rendering bits.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 13 June 2008 08:25:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:18 GMT