W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] clarification on createRadialGradient( x0, y0, r0, x1, y1, r1 )

From: Mathieu HENRI <p01@opera.com>
Date: Mon, 27 Nov 2006 18:41:47 +0100
Message-ID: <456B235B.8000702@opera.com>
Hi,


The current specification of the createRadialGradient( x0, y0, r0, x1, 
y1, r1 ) [1] is a bit ambiguous about the colour to use in the disc 
defined by x0, y0, r0 when a colorStop is set for the offset 0. Should 
the disc be transparent black or should it be filled with the color 
defined for the offset 0 ?

It seems more sense to fill the it with the color set at the offset 0. 
And if the developers want to have a 'holed' radial gradient they can 
easily set the first colorStop to rgba( R, G, B, 0 )



Regards,



[1] 
http://www.whatwg.org/specs/web-apps/current-work/#createradialgradientx0

" _Radial gradients are rendered such that a cone is created from the 
two circles_ , so that at the circumference of the starting circle the 
colour at offset 0 is used, that at the circumference around the ending 
circle the color at offset 1 is used, that the circumference of a circle 
drawn a certain fraction of the way along the line between the two 
origins with a radius the same fraction of the way between the two radii 
has the colour at that offset, that the end circle appear to be above 
the start circle when the end circle is not completely enclosed by the 
start circle, and that _any points not described by the gradient are a 
transparent black_.

If a gradient has no stops defined, then the gradient is treated as a 
solid transparent black. Gradients are, naturally, only painted where 
the stroking or filling effect requires that they be drawn. "


-- 
Mathieu 'p01' HENRI
JavaScript developer, Opera Software ASA
Received on Monday, 27 November 2006 09:41:47 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:30 UTC