[cairo] cairo_paint_with_alpha()

Owen Taylor otaylor at redhat.com
Fri May 6 12:06:43 PDT 2005

On Fri, 2005-05-06 at 14:43 -0400, Carl Worth wrote:

> > + * A drawing operator that paints the current source everywhere within
> > + * the current clip region, (as cairo_paint()), but through a mask
> > + * of a constant alpha value @alpha.
> The idea here is that there will be an introductory chapter
> (eventually) that introduces the fundamental drawing operator, along
> with terms such as "source" and "mask", so that we can refer to them
> consistently here.

I'm committing:

 * A drawing operator that paints the current source everywhere within
 * the current clip region using a mask of constant alpha value
 * @alpha. The effect is similar to cairo_paint(), but the drawing
 * is faded out using the alpha value.

I don't think "a mask of constant alpha value @alpha" is a clear
enough explaination to stand on its own. (Not everyone will read
the intro...)

> > It's not really clear to me what the distinction between the
> > coverage.c and mask.c is.
> Yes, it did seem we were getting fairly arbitrary sets of overlapping
> test matrices here.
> > I wonder if we should just remove coverage... with text disabled
> > it doesn't test anything that isn't already tested by 
> > mask, and trap-clip.c.
> Sounds fine to me. If we're getting just as much test coverage, I'd
> prefer to have it in fewer tests.

OK, removing coverage.

>  (Speaking about the matrix-based
> tests here. For focused tests, it is still quite useful to test
> individual pieces of functionality in separate tests; they are much
> easier to tweak, expand, or share for real use, for example).

I think the matrix-based-tests are the right way to test things that
"go right" ... mask.c is really 36 (3*3*4) separate tests that all
pass and much easier to maintain than that.

But yes, for XFAIL tests, or test cases submitted with bug reports, 
it's better to have a focused test, than an extension of a matrix test.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050506/cfeb6e77/attachment.pgp

More information about the cairo mailing list