ImageEn, unit iexBitmaps

TIEBitmap.MergeAlphaRectTo

TIEBitmap.MergeAlphaRectTo


Declaration


procedure MergeAlphaRectTo(Dest: TIEBitmap; SrcX, SrcY, DstX, DstY: integer; RectWidth, RectHeight: integer
                           MergeMethod: TIEMergeMethod = iemMax; MergePercent: Double = 1);


Description


This method merges the alpha channel to Dest bitmap alpha channel using the specified method.

Merge Method Effect
iemmMax Maximum alpha of source and dest is used
iemmMin Minimum alpha of source and dest is used
iemmAdd Alpha of dest is increased by that in source (effect can be reduced by specifying a lower value for MergePercent)
iemmSubtract Alpha of dest is reduced by that in source (effect can be reduced by specifying a lower value for MergePercent)
iemmReplaceWithSrc Replaces alpha of dest, with that of source pixels where alpha > 0



Example


// 50% merge of alpha in Source to dest alpha
bmp.MergeAlphaRectTo( ImageEnView1.IEBitmap, 0, 0, 0, 0, bmp.Width, bmp.Height, iemmSubtract, 0.50 );
ImageEnView1.IEBitmap.SyncFull();