Closed Bug 573687 Opened 15 years ago Closed 15 years ago

Radial gradients with small radii are not clamped correctly

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: longsonr, Assigned: longsonr)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
We need to take an absolute value off to ensure different cairo fractions, not an amount we multiply by the radius because this will fail if the radius is significantly less than 1.
Attachment #452999 - Attachment is patch: true
Attachment #452999 - Flags: review?(jwatt)
Does what we get here depend on the CTM of the element being filled? In other words do you know if cairo could end up rounding the value due to converting to absolute coordinates?
The problem is here: http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-pattern.c#444 The call stack is new gfxPattern cairo_pattern_create_radial _cairo_pattern_innit_radial And the arguments are passed through unchanged to that point. There is a cairo_pattern_transform but it looks like when this is applied in _cairo_pattern_get_extents it's working in doubles. So on the whole it looks OK to me.
btw I should have used NS_MAX rather than PR_MAX as it seems PR_MAX is deprecated now. I can fix that on check in.
Comment on attachment 452999 [details] [diff] [review] patch Okay, great. Thanks for checking.
Attachment #452999 - Flags: review?(jwatt) → review+
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: