Re: [svg2] radialGradient @fr constraints

On 29-08-12 10:32, Erik Dahlstrom wrote:
> Some issues regarding the added 'fr' attribute on radialGradient:
>
> a) Should 'fr' be allowed to be negative? (this is disallowed in
> <canvas>). What should happen if it is?
> b) Should we still keep the constraint[1] to move the focal point inside
> the other circle? <canvas> doesn't do this. What the spec currently
> defines means some kinds of conical gradients aren't possible to do with
> <radialGradient>.
> c) Related to b): the case where the focal point is outside the other
> circle, but the focal radius makes the two circles intersect, how should
> that be handled?

The PDF specification deals with this quite nicely in my opinion. The 
radial gradient is considered to be (conceptually) a superposition of 
"blend circles", drawn from the start to the end circle. This takes care 
of (b/c) in the sense that there is a simple and unambiguous way to 
specify how the appearance of the gradient, without any artificial 
restrictions.

As for allowing fr to be negative, there might be certain use cases (you 
can get different effects), and I doubt it's a huge problem for 
implementations. However, you can always get the same result by 
splitting up the gradient in two (at the point where r=0).

Received on Wednesday, 29 August 2012 11:20:04 UTC