Applying to a surface the alpha of other

Carlos López González <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAF52pzJJsXFvOjZ_B8Ggt-Z3qO=5QtWf_CHG1LkD4bhAd5ZdVg@mail.gmail.com>
Hi!

I'm dealing with a problem of compositing surfaces and I have a
situation that I would like to solve by using the Cairo operators but
I don't find a way to solve it.

Say I have two surfaces: A and B of the same dimensions
I would like to have a result surface (R) with the following properties:

(I'm using the nomenclature from the http://cairographics.org/operators/ page)

aR=aA
xR=xB

I've tried to achieve that operations by using the current Cairo
operators but I always get with axB for the color and not xB.

Is there any way to perform this or should I need to modify the data directly?

Alternatively to this I would be also happy if I can do the following operation:
Given a surface B I would like to obtain another surface (R) that satisfies:

aR=1
xR=xB

So masking the resulting surface with the surface A I would obtain the
desired result.

Then basically the question is: How do I change the alpha channel of
all the pixels to be 1.0?

Thanks in advance!
-- 
Carlos
http://synfig.org
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.