[Lazarus] Replicating Microsoft's AlphaBlend function with Cairo

Marc Weustink marc.weustink at cuperus.nl
Mon Aug 27 14:25:28 CEST 2012


Anthony Walter wrote:
> How can I stretch draw an area of a gdk pixbuf to a cairo surface with a
> user defined opacity?
>
> I am trying to write a cross platform interface for working with bitmaps
> and want to add alpha blending to my cairo stretch draw method. What I
> have right now works just fine, but I am unable to think up a way of to
> mold alpha blending into a series of cairo/gdk apis which work somewhat
> like Microsoft's [AlphaBlend][1] function.


IIRC When implementing Alphablend for the LCL, I've written an 
AlphaBlend replacement for win9x winNT and WinCE.
It's somewhere in the windows interface sources.

This routine simply blends buffers of rgba pixels

Marc






More information about the Lazarus mailing list