Bug 4184 - Wrong interpretation of FILTER for gradients
Summary: Wrong interpretation of FILTER for gradients
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 09:19 UTC by Owen Taylor
Modified: 2005-08-22 21:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Owen Taylor 2005-08-22 09:19:45 UTC
The gradient code in cairo-pattern.c does really funky things with
the "filter" setting of the pattern. It uses it to influence
how we interpolate between the color stops. For a gradient
from 0 to 1 you can get colors looking like:

       +-------
       |          (NEAREST)
       |
 ------+

    /
   /        (GOOD, BEST, BILINEAR)
  /
 /

     .-'''''
    /           (GAUSSIAN)
   /             
 ..

This is clearly wrong ... the color values should always
be the second image. Filtering is somewhat meaningful for
gradients that change very rapidly - imagine zooming out
to infinity on a white-black gradient with EXTEND_REPEAT -
we should get uniform gray, not white and black aliasing
artififacts. But that's subtle, and entirely different
from what is implemented currently.
Comment 1 Carl Worth 2005-08-22 17:14:06 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Comment 2 Owen Taylor 2005-08-23 14:53:24 UTC
2005-08-23  Owen Taylor  <otaylor@redhat.com>

        * src/cairo-pattern.c (_cairo_pattern_calc_color_at_pixel):
        Rip out all the code for doing anything other than linear
        interpolation between color stops, instead of doing different
        funky things based on pattern->filter. (#4184)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.