typedef enum _cairo_extend { CAIRO_EXTEND_NONE, CAIRO_EXTEND_REPEAT, CAIRO_EXTEND_REFLECT } cairo_extend_t; Is missing one of the most commonly needed extend modes - using the nearest pixel within the image. A common usage of this is when you want to scale an image with a "hard edge" but with filtering of its contents. EXTEND_NONE fuzzes out the edges. See: http://lists.freedesktop.org/archives/cairo/2005-July/004487.html and followups for one example of this problem. (Message unfortunately munged out of recognition by pipermail, but I'll leave the link in hopes that will be fixed at some point without renumbering the archives.)
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
davidr and I have a patch we would like reviewed.
Created attachment 3522 [details] [review] Patch The difficult issue with this patch is that we are proposing that CAIRO_EXTEND_NONE work the same with images as well as gradients. Currently when rendering gradients, using CAIRO_EXTEND_NONE gives you a gradient with the "nearest" extend behaviour. Our proposed change fixes this bug.
We talked to cworth and otaylor about the changes. The break in this change is that code which explicitly asked for EXTEND_NONE for gradients would get the NEAREST behaviour in 1.0. However, given the way NONE is defined, this seems to be truly a bug fix and not an API change.
[I wrote this before Billy resolved the bug---but here it is rather than throwing it away.] CAIRO_EXTEND_NONE should work the same for all patterns, (by extending as transparent). What we shouldn't change is the default behavior of gradients, (which have been extending as NEAREST even though the default was nominally NONE). So I like the patch, it adds NEAREST and changes gradient extent to NEAREST to preserve the current behavior. I assume it also fixes the behavior of NONE for gradients, (which is a bug fix and hopefully won't cause any compatibility problems). Different extend defaults for different pattern types is a bit goofy, but does give the desired (and compatible) behavior. The last thing I see missing here is documentation for the different extend modes, and documentation for the default extend modes for the various patterns.
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.