Page 1 of 1

AlphaBlt with Mask

PostPosted: Aug 8, 2002 @ 5:58am
by efortier
Hi,

I need to draw an alpha blitted image, with a mask.

That is, I want to draw an image which has a transparency mask, on a background and do alpha blending on parts of the image.

I would like to create a new function for this purpose, and I wanted to know if I use the "AlphaBlendFast" inline functions in GapiDrawExtension.h, will I get the same stability as the other GapiDraw calls?

I mean, if I do a straight loop on the data (I already know how to do it), blending and cutting data as I go, is it possible that I overlook something and the function will not work on "this" or "that" PocketPC device?

I would like to do a new function to prevent the time required to do several blits to achieve the same result.

Thanks for any input!

--Eric

PostPosted: Aug 8, 2002 @ 1:53pm
by Johan
Hi,

It should work without issues.

The only thing you might want to do is to call the OptimizePitch operation before starting the blit main loop. OptimizePitch swaps the width and height (and also adjust xPitch so it always becomes +1) so that data is read in a cache-optimized way.

/Johan