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: Dirk Schulze <dirk@dschulze.com>
Date: Fri, 19 Aug 2011 11:59:47 +0200
Cc: public-svg-wg@w3.org
Message-Id: <0F8535F0-D59E-4A3E-89CA-F814D2967944@dschulze.com>
To: Cyril Concolato <cyril.concolato@telecom-paristech.fr>

Am 19.08.2011 um 10:55 schrieb Cyril Concolato:

> Le 19/08/2011 10:48, Dirk Schulze a écrit :
>> 
>> Am 19.08.2011 um 10:46 schrieb Dirk Schulze:
>> 
>>> Am 19.08.2011 um 10:33 schrieb Cyril Concolato:
>>> 
>>>> Cameron,
>>>> 
>>>> Le 04/08/2011 17:43, Cyril Concolato a écrit :
>>>>>> 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).
>>>> Any idea about the reasons for this behavior ?
>>> I commented on IRC during the telcon yesterday. Firefox does never position the focal point on the edge. It always moves the point into the circle. On WebKit we follow the behavior of Firefox [1].
>>> The main reason for us was the test pservers-grad-13-b [2]. We had different results across our if we position the focal point on the edge. This does not happen on moving the focal point into the circle.
>>> 
>>> Dirk
>>> 
>>> [1] http://trac.webkit.org/browser/trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp#L224
>>> [2] http://dev.w3.org/SVG/profiles/1.1F2/test/svg/pservers-grad-13-b.svg
>>> 
>> 
>> *We had different results across our different ports and platforms if we position the focal point on the edge...
>> 
>> Sorry.
> Thanks, I missed that part during the telcon. Your code shows that you clamp the focalPoint to 99% of the radius. Is there a particular reason? What happens if the radius is large, is the 1% difference still not visible?

We had the same doubts but thought it is better to have a constant behavior across WebKit platforms and Firefox. But indeed, it can cause differences like in my example [1]. It just looks like all viewers have some kind of optimization. While you see a red area next to the green area in WebKit and Firefox, you see just a green area on Opera and a small red line next to a green area in batik and IE 10.

Dirk

[1] http://dschulze.com/svg/focal.svg
Received on Friday, 19 August 2011 10:00:37 UTC

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