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: Sat, 20 Aug 2011 07:14:15 +0200
Cc: Cyril Concolato <cyril.concolato@telecom-paristech.fr>, public-svg-wg@w3.org
Message-Id: <022DEA81-9EE3-4DC2-A983-77312FC95ADE@dschulze.com>
To: Cameron McCormack <cam@mcc.id.au>

Am 20.08.2011 um 02:45 schrieb Cameron McCormack:

> Regarding Firefox's behaviour, see the comment in the source:
> http://mxr.mozilla.org/mozilla-central/source/layout/svg/base/src/nsSVGGradientFrame.cpp#569
> So I'd say we chose to clamp the focal point to be within the circle just to avoid the undefined behaviour in the spec.
I think there was a discussion about the behavior for focal points outside the circle on the whatwg too. IIRC it is defined for HTML Canvas now. But just the graphic library Core Graphics matches the behavior described by Philip Taylor. He also wrote a test that is just passed by Safari, but I couldn't find his example again. The test was not part of his test suite. I suggest not to allow a focal point to get outside of the outer circle because of the different behavior across graphic libraries. Just like SVG is doing it right now. Maybe we should at least harmonize radial gradients with HTML canvas and allow a focal (inner) radius [1] next to the outer radius. I still hope that HTML spec won't allow inner circles to get outside the outer circle later.


[1] http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createradialgradient
Received on Saturday, 20 August 2011 05:14:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:29:46 UTC