[cairo] Problem with stretched images

Ed Voas voas at mac.com
Tue Sep 5 12:02:00 PDT 2006


On Sep 5, 2006, at 11:54 AM, Carl Worth wrote:

> On Tue, 5 Sep 2006 11:12:02 -0700, Ed Voas wrote:
>> I briefly searched the archives, but I'm seeing an issue where images
>> that are stretched don't handle the boundary cases properly. As a
>> result, the edges of the image are effectively blended with a zero
>> pixel, causing the edges to fade. I found the issue inside pixman and
>> fixed it for my case, but I'm wondering if this is already known and
>> fixed (I am using 1.10 at present, I believe), or if not, how can I
>> get the fix back into cairo/pixman itself.
>
> This is a known, open issue. The latest conversation on the topic can
> be seen in the following messages:
>
> http://lists.freedesktop.org/archives/cairo/2006-August/007672.html
> http://lists.freedesktop.org/archives/cairo/2006-August/007673.html
>
> Under the current model, the behavior you are seeing is "correct" for
> the default CAIRO_EXTEND_NONE semantics for surface patterns, (where
> all pixels "outside" the surface are transparent). With this model the
> approach to get the behavior you want is to use CAIRO_EXTEND_PAD
> instead, (but there's a bug in that this doesn't actually work
> yet---oops!).
>
> So we need to get the surface PAD stuff fixed.
>
> Meanwhile, in the above message, Vlad proposes changing the model to
> get this behavior by default in order to avoid confusion such as what
> you have hit here. And I think the principle of least surprise makes a
> good argument that direction.

I would agree with that. And good to finally understand why it's  
happening (it all finally makes sense). Thanks.

-- Ed



More information about the cairo mailing list