[Webkit-unassigned] [Bug 40985] gradient stroke on lines does not work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 28 06:15:01 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40985





--- Comment #4 from rspierer at hotmail.com  2010-06-28 06:15:01 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > I'm a bit confused, that the other browsers (Firefox, Opera) draw the stroke with the gradient. An object with a one dimensional boudingBox (height or width = 0) shouldn't be stroked with a gradient, but instead use a fallback color or ignore stroke at all. And a line doesn't have a height. We use black instead of ignoring the stroke, because of compatibillity reasons to older Firefox and Opera browsers.
> > 
> > The gradient here is specified with gradientUnits="userSpaceOnUse".

> > Where exactly the SVG specification effectively states that gradients do not apply to lines?
> 
> Sorry, I'm not sure where to find this paragraph atm. Maybe the following test can help you more: http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-pservers-grad-17-b.html The gradient is not drawn on all objetcs, since some of them have a one dimensional objectBoundingBox (width or height == 0).

If you really want to be helpful you may try to clear your confusion in first place.

The section that deals with bounding box (SVG 1.1, 7.11) says:
"Keyword objectBoundingBox should not be used when the geometry of the applicable element has no width or no height, such as the case of a horizontal or vertical line, even when the line has actual thickness when viewed due to having a non-zero stroke width since stroke width is ignored for bounding box calculations. When the geometry of the applicable element has no width or height and objectBoundingBox is specified, then the given effect (e.g., a gradient or a filter) will be ignored."

There is no rule in the latest SVG 1.1 specification which prohibits applying gradients specified with gradientUnits="userSpaceOnUse" to horizontal or vertical lines.

In the W3C test you gave the gradient is ignored on 3 objects because they are defined as horizontal lines AND the gradient is implicitly specified with gradientUnits="objectBoundingBox".

I don’t see a sane reason for imposing an additional (not mentioned in the SVG specification) discontinuous behavior similar to that described in the cited paragraph. It simply doesn’t make sense from a practical perspective to have a gradient on an inclined line, but not on a non-inclined (horizontal or vertical) line.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list