[cairo] Stange alpha channel problem.

Paul Giblock drfaygo at gmail.com
Tue Jun 13 15:16:46 PDT 2006


Oops, forgot to "RE All".  Thanks for the quick response. Here is a
recreation of the problem.  The code isn't the best since it was just
stitched together from several other files in my real project.

-Paul


On 6/13/06, Carl Worth <cworth at cworth.org> wrote:
> On Tue, 13 Jun 2006 15:53:22 -0400, "Paul Giblock" wrote:
> >
> > First, I would like to thank the Cairo developers for providing such a
> > nice library.
>
> On behalf of all of us, you are most welcome.
>
> > This works, in that the image is displayed in the right place and is
> > properly clipped.  Unfortunately, the areas of the surface underneith
> > the transparent areas get darker each time I draw the image.  For
> > example: My surface I am rendering to may be 255,0,0 (red). Each time
> > I draw the image over the surface the visible red areas get darker.
> > These areas will only get as dark as (128,0,0).
>
> I've tried to replicate this, but I haven't succeeded yet.
>
> I've attached the test program I wrote which starts by filling a 3x3
> surface with red, then hits the center pixel with several different
> forms of zero alpha, (including drawing an image surface through a
> clip). In every case I've tried so far, that center pixel never
> changes.
>
> If you can identify what distinguishes this test from your code, and
> then augment this test to demonstrate the bug, that would be most
> appreciated.
>
> I've attached the test in two forms.
>
> The first (zero-alpha.c) is a self-contained program, whose first line
> indicates how it should be compiled. It targets the image backend
> only.
>
> The second (test-zero-alpha.c) is ready to be dropped into the cairo
> test suite. Just copy it into cairo/test and edit test/Makefile.am
> adding the name of the file (without the .c extension) to the TESTS
> list. This will target all backends available to the test suite,
> (which includes the xlib backend that you are using).
>
> Good luck. And have fun with cairo!
>
> -Carl
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zero-alpha-prg.c
Type: application/octet-stream
Size: 4936 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060613/db308c67/zero-alpha-prg-0001.obj


More information about the cairo mailing list