Closed Bug 719727 Opened 10 years ago Closed 10 years ago

SVG: Gradient fill that is part of a pattern is cut off

Categories

(Core :: SVG, defect)

9 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: cvetomirconev, Unassigned)

References

Details

Attachments

(4 files, 1 obsolete file)

Attached image Test case (obsolete) —
Linear gradients that are part of a pattern are not rendered correctly.

This is always visible when the pattern is applied to a path.

The behavior changes when the pattern is applied to a circle. I've created an animated test case that clearly shows this. Note that turning the animation off doesn't help.

I was able to work around it by setting patternContentUnits to objectBoundingBox and transforming the coordinates.

Originally reported on StackOverflow:
http://stackoverflow.com/questions/8929731/svg-pattern-inconsistency-between-chrome-and-firefox
Attached image Workaround
Workaround for the problem by using patternContentUnits="objectBoundingBox"
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
Attached image testcase
Actually circle is no different to path. Your testcase changes y for the circle, but transform for the path, meaning that you are not changing user space for the former, but are for the latter. This testcase animates transform for both the circle and the path to compare apples to apples.

I'm not entirely sure this is even a bug to be honest, but I don't have time to consider it properly right now during this drive-by comment.
Attachment #590133 - Attachment is obsolete: true
Attached image Static test case
Static version of the test case
Attached image Browser screenshots
Screenshots of the static test case in FF/Chrome/IE
I agree with you, translate has the same effect for circles and paths.

Animation is not required to reproduce the bug. I've used it to highlight the issue, but it can be observed for static shapes. See the static test case and screenshots.
Depends on: 773595
Fixed by patch in bug 773595
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.