[cairo-bugs] [Bug 29470] Gradient rendering is imprecise

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Oct 21 03:09:28 PDT 2010


Andrea Canciani <ranma42 at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Andrea Canciani <ranma42 at gmail.com> 2010-10-21 03:09:25 PDT ---
(In reply to comment #8)
> (In reply to comment #7)
> > Two pixman branches fixing the rendering of linear gradients are available
> > here:
> > http://cgit.freedesktop.org/~ranma42/pixman/log/?h=wip/linear-fixed
> > http://cgit.freedesktop.org/~ranma42/pixman/log/?h=wip/linear-float
> Both branches work correctly on the test case and in the Cairo port of
> Inkscape.

A set of changes based on those branch has recently been merged in

commit 1d4f2d71facd5f2bbce74fbe3407ccea6cf4bea1
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Wed Aug 11 09:58:05 2010 +0200

    Improve precision of linear gradients

    Integer division (without keeping the remainder) can discard a lot
    of information. Doing the division maths in floating point (and
    paying attention to error propagation) allows to greatly improve
    the precision of linear gradients.


commit 9b72fd1b857494ea928795c89a4f827e56fe26d3
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Oct 18 22:21:52 2010 +0200

    Make classification consistent with rasterization

    Use the same computations to classify the gradient and to
    rasterize it.
    This improves the correctness of the classification by
    avoiding integer division.

> When the gradient has a transformation matrix with entries that exceed the
> range of 16.16 fixed point, the rendering is still wrong. That's a different
> problem though, so I'll file it separately.

I can't find the bugreport. It would be very useful to also have a testcase and
to also check if the same problem affects radial gradients.

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

More information about the cairo-bugs mailing list