[cairo] Proposed simplified replacement for Cairo compositing operators.

Bill Spitzak spitzak at d2.com
Thu Oct 21 17:51:29 PDT 2004


On Thursday 21 October 2004 02:01 pm, Thorsten Behrens wrote:
> Yesterday, you wrote:
> > Microsoft's GDI+ has added a (somewhat undocumented, look for
> > BLENDFUNCTION) flag to indicate source images are unpremultiplied.
>
> Hi Bill,
>
> just out of curiosity (Google did not turn up anything about that): what's
> that flag called? I only know about AC_SRC_ALPHA, which requires
> premultiplied colors.

Apparently, and I'm not sure who informed me of this, you put a 1 in the 
AlphaFormat field of the BLENDFUNCTION. The MSDN documentation only mentions 
a constant called AC_SRC_ALPHA which is 0. You then have to use the 
AlphaBlend() function. Also you have to use some other calls to create the 
"source" Bitmap needed by that call, there is no way to do this directly from 
some in-memory data.



More information about the cairo mailing list