Closed
Bug 271552
Opened 20 years ago
Closed 18 years ago
Opacity of elements referencing a gradient isn't respected (opacity, fill-opacity and stroke-opacity)
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 357163
People
(Reporter: bugzilla, Unassigned)
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041122 When drawing a line that has a stroke defined by a linear gradient, the opacity attribute is ignored. In the following example, only the first line should be displayed, the second one should be invisible. However, with current build, both lines are shown. <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 100 100"> <defs> <linearGradient id="hardGradient"> <stop offset="0%" stop-color="#0000ff"/> <stop offset="100%" stop-color="#ffffff"/> </linearGradient> </defs> <g id="testGroup"> <rect x="0" y="0" width="100" height="100" style="stroke:none;fill:#ddddff;"/> <line x1="10" y1="30" x2="90" y2="30" style="stroke:url(#hardGradient); opacity:100; stroke-width: 5;"/> <line x1="10" y1="60" x2="90" y2="60" style="stroke:url(#hardGradient); opacity:0; stroke-width: 5;"/> </g> </svg> Reproducible: Always Steps to Reproduce: 1. Create linear gradient 2. Create a line element and assign its stroke to the defined linear gradient 3. Assign opacity 0 with line. Actual Results: Line was shown Expected Results: Line should have been invisible
Comment 1•19 years ago
|
||
Note, the reporter isn't refering to stop-opacity, but rather the opacity of the element referencing the gradient. We get this behaviour for both fill and stroke. Here's a testcase.
Comment 2•19 years ago
|
||
The rect shouldn't be visible when you view the testcase BTW. Changing summary to make it clear we're not talking about stop-opacity.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Opacity not respected when linear gradient is used → Opacity of elements referencing a gradient isn't respected
Updated•19 years ago
|
Flags: testcase+
Comment 3•19 years ago
|
||
I'm seeing the rectangle on: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050915 Firefox/1.4 Suggest changing Platform/OS to all.
Updated•19 years ago
|
Summary: Opacity of elements referencing a gradient isn't respected → Opacity of elements referencing a gradient isn't respected (opacity, fill-opacity and stroke-opacity)
Comment 4•19 years ago
|
||
This test case specifically tests the "fill-opacity" attribute when using a gradient fill
Trying to add a new test case to readily demonstrate the issue. This bug seems to be overlooked, so I am trying to make the situation clearer. Test against Firefox 2.0 and still broken.
*** This bug has been marked as a duplicate of 357163 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Comment 7•17 years ago
|
||
Reftest checked in: http://lxr.mozilla.org/seamonkey/source/layout/reftests/svg/opacity-and-gradient-01.svg
Updated•17 years ago
|
Flags: in-testsuite+
Updated•17 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•