Re: [svgwg] Radial gradients: "fully overlapping" vs "focal point on the edge" - which takes precedence? (#648)

The SVG Working Group just discussed `Radial gradients: "fully overlapping" vs "focal point on the edge" - which takes precedence?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;myles> topic: Radial gradients: "fully overlapping" vs "focal point on the edge" - which takes precedence?<br>
&lt;myles> GitHub: https://github.com/w3c/svgwg/issues/648<br>
&lt;myles> krit: As AmeliaBR pointed out, we introduced "fr" attribute. It's a focal radius. If you don't know what that means, radial gradients consist of 2 circles. The starting circle and the end circle, and interpolate between. The focal radius is a generalization of the focal point (whcih is a focal radius of 0). What happens if we have an fr and a normal radius being 0, and cx, cy, fx, fy, are on top of the radius for focal and normal radius?<br>
&lt;myles> krit: There's an example in the issue.<br>
&lt;myles> krit: You see a yellow box and a blue box. Yellow uses SVG. You have a radial gradient. Both distances are 0. The focal distance is placed on top, which is 0. Which color should the rectangle with teh radius get filled with? Should it be yellow? Should it not have a color and the blue shines through from below?<br>
&lt;myles> AmeliaBR: There's no way in the spec that it should be transparent because radial gradient is always padded, no matter what other attributes, so it always should be padded with one of the stops. So Chrome / WebKit is treating the radial gradient as an error, in which case it should be orange, or they pad it with yellow. I haven't gone into the details ...<br>
&lt;myles> AmeliaBR: That's the one weird thing of the focal radius, it doesn't necessarily draw whereever, even when spreadMethod is padded?<br>
&lt;myles> krit: Yeah...<br>
&lt;chris_> Edge does the same as Firefox, fwiw<br>
&lt;myles> AmeliaBR: We don't have an example, it would be different from other SVG gradients<br>
&lt;myles> AmeliaBR: We don't have a spread method that is "Stop drawing the gradient outside of the circle." Instead, it's just pad, reflect, or repeat.<br>
&lt;myles> AmeliaBR: So that would be problematic.<br>
&lt;myles> krit: I thought the right answer would be yellow.<br>
&lt;myles> krit: But if you compare the canvas, you get blue.<br>
&lt;myles> krit: We tried to work on the focal radius to maek the canvas gradient as compatible with SVG gradient<br>
&lt;myles> Tavmjong: They can't agree.<br>
&lt;myles> Tavmjong: The limiting case if they're not quite on top of each other, you would expect to stop drawing otuside as soon as they overlap<br>
&lt;myles> krit: right.<br>
&lt;myles> krit: I get what you mean.<br>
&lt;myles> krit: We should explicitly point that out in the spec.<br>
&lt;myles> krit: There's a difference between canvas and SVG. SVG might not be able to be fully compatible, but pointing it out would help, maybe as an example. Doesn't have to be normative. Normative text already covers this.<br>
&lt;myles> Tavmjong: We already have a note about another difference between canvas and SVG. When the focal point is distanced by the right side of the circle. If you look in the spec, you'll see it in 15.2.3.2, the second green box<br>
&lt;myles> s/15.2.3.2/14.2.3.2/<br>
&lt;myles> Tavmjong: "Notes on radial gradients"<br>
&lt;myles> Tavmjong: That deals with a focal point being on the circle<br>
&lt;myles> AmeliaBR: That's separate from talking about the focal radius being overlapping.<br>
&lt;myles> AmeliaBR: Whatever happens, if there is an error, that we have clear error behavior, or if we use one stop or the other, we have clear behavior. But turning the gradient transparent isn't consistent with anything.<br>
&lt;myles> krit: That is the annotation. Annotation 3, I see this comment. I don't see it anywhere else.<br>
&lt;myles> AmeliaBR: Maybe that note should be promoted?<br>
&lt;myles> krit: I thought annotations were going to be in the spec but not visible<br>
&lt;myles> Tavmjong: yeah<br>
&lt;myles> &lt;general confusion><br>
&lt;AmeliaBR> Scribenick: AmeliaBR<br>
&lt;AmeliaBR> Amelia: There are two notes. One mentions a change vs SVG 1.1 to conform with Canvas, the other mentions that there is still a difference compared to canvas (padding with solid color vs padding with transparent black) to keep consistency with SVG 1.1.  But the question is whether normative text backs up those notes.<br>
&lt;AmeliaBR> Dirk: Ok, I think we need to review again &amp; comment on the issue, maybe come back next week.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/648#issuecomment-471728853 using your GitHub account

Received on Monday, 11 March 2019 21:03:20 UTC