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

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.

Dirk

[1] http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createradialgradient

Received on Saturday, 20 August 2011 05:14:44 UTC