[cairo] Alpha masks
Carl Worth
cworth at cworth.org
Thu Jan 6 22:09:59 PST 2005
On Thu, 6 Jan 2005 18:00:44 -0800, Bill Spitzak wrote:
> I have proposed before the actual elimination of all compositing operations
> that are able to modify where alpha is zero. This restricts the functionality
> even more than you are proposing, but I feel it is well worth it for
> simplifying the situation.
I still don't see how this can work. The eliminated operators,
(according to Owen's recent examination) are:
Clear, Src, In, InReverse, Out, and AtopReverse
and I don't see how all of those can be emulated.
Without Clear and Src there would be no way to clear the output to
zero alpha. So, in addition to "invert path", there would at the very
least need to be a new "erase output" operator. But I want to simplify
the current state of affairs by having fewer fundamental drawing
operators, not more.
> This does require an "invert the path" operator that makes fill-path draw
> *outside* rather than inside (ie the area inside the clip that is not inside
> the path). With this addition you can simulate all the existing operators by
> drawing both the inside and outside with different operators.
And I guess the other thing that I don't like about this is that we
end up with infinitely large geometry. For some reason, it's easy for
me to accept operators with infinite effects, (eg. draw a small object
with SRC and the output is cleared to infinity outside the
object). But it feels much more awkward to have to deal with
infinitely large operands.
That said, I do want to simplify the current operator set. I'll start
a new thread for that.
-Carl
More information about the cairo
mailing list