W3C home > Mailing lists > Public > public-svg-wg@w3.org > July to September 2011

Re: About current gradients (Re: minutes, SVG WG Seattle F2F 2011 day 3)

From: Cyril Concolato <cyril.concolato@telecom-paristech.fr>
Date: Thu, 04 Aug 2011 17:43:58 +0200
Message-ID: <4E3ABE3E.9080709@telecom-paristech.fr>
To: public-svg-wg@w3.org
Le 04/08/2011 17:36, Cyril Concolato a écrit :
> Le 30/07/2011 07:38, Cameron McCormack a écrit :
>> current gradient issues.
>> <trackbot> Created ACTION-3097 - Propose wording for the edge case
>> where a radialGradient's focal point sits on the edge of the circle
>> and the gradient repeats. the spec. should say that when the focal
>> point is on the circle edge, with repeat, then the distance between
>> the first and last stop for the repeating colors is 0 and the paint
>> should generate a color that is the average of all the gradient
>> stops. [on Erik Dahlström - due 2011-08-05].
> I don't understand this action and the associated resolution.
> Looking at the SVG 1.1 2nd Ed, and unless I missed some text, there's only a picture showing what it should look like. So it's not very clear how a gradient should be drawn:
> a) inside the gradient circle,
> b) outside the circle going from the focal point to the center and away
> c) outside the circle going from the focal point opposite to the center.
>
> For the inside of the gradient circle, I believe that the definition from the Canvas spec [1] is mathematically what SVG players do (except for the fr, see below). I think that definition would work also for pixels outside the gradient circle, but opposite of the focal point from the center (case b). For case, c) I don't think there's a defined behavior. We could decide to fill the rest with the last stop color or we could decide to flip the content with of the half-plane separated by the normal to the center-focal vector.
>
> I've made two examples showing how the gradients are built. Have a look here:
> http://concolato.wp.institut-telecom.fr/2011/08/04/svg-radialgradients/
I forgot to mention for the edge example, notice how Firefox behaves differently (even for points located on the left of the focal point) from other browsers (the black circle is not aligned with the gradient circles).

Cyril
-- 
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Multimedia/Multimedia Group
Telecom ParisTech
46 rue Barrault
75 013 Paris, France
http://concolato.wp.institut-telecom.fr/
Received on Thursday, 4 August 2011 15:43:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:13 UTC