[cairo] unbounded by source operators != unbounded by mask operators

Carl Worth cworth at cworth.org
Thu Oct 27 20:53:43 PDT 2005


On Thu, 27 Oct 2005 19:10:57 -0700, Keith Packard wrote:
> I've found several places in the code which want to know whether the
> operation is bounded by the source and are using _cairo_operator_bounded
> in conjunction with explicit tests for SOURCE and (sometimes) CLEAR
> operations. This seems silly to me, and I also wonder if some of these
> existing cases are wrong as they don't check for CLEAR.
> 
> I suggest renaming our existing function and adding a new one:

Good catch Keith, and I like the distinction in the functions and
their names here.

Two minor notes/questions on the documentation of the new function:

>  * A bounded operator is one where source pixels (not just alpha)
>  * of zero results in no effect on the destination image.

What does the "(not just alpha)" refer to here? That's not clear to
me.

>  * Unbounded operators often require special handling; if you, for
>  * example, copy a surface with an unbounded operator, the effect
>  * extends past the bounding box of the surface

"copy a surface with an unbounded operator" ? Wouldn't it be more
clear to just say "if you, for example, draw with the SOURCE operator,
the effect extends" ?

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051027/c90633f3/attachment.pgp


More information about the cairo mailing list