FeatherAlphaBlendExt example for Delphi
Var
XDst: Integer;
YDst: Integer;
XSize: Integer;
YSize: Integer;
XSrc: Integer;
YSrc: Integer;
begin
LEADImage1.Load('Image1.cmp', 0, 1, 1);
LEADImage2.Load('Image2.cmp', 0, 1, 1);
{ Specify a position in the top left part of the displayed image }
XDst:= Trunc(LEADImage1.BitmapWidth / 8);
YDst:= Trunc(LEADImage1.BitmapHeight / 8);
{ Use the half size of the source bitmap }
XSize:= Trunc(LEADImage2.BitmapWidth / 2);
YSize:= Trunc(LEADImage2.BitmapHeight / 2);
XSrc:= 0;
YSrc:= 0;
{ Create a rectangular region }
LEADImage2.SetRgnRect(XSrc, YSrc, XSrc + XSize , YSrc + YSize, L_RGN_SET);
{ create the fade mask }
LEADImage3.CreateFadedMask(LEADImage2.Bitmap, 60, 20, 3, 0, FADE_DUMPFILL + FADE_NOTRANSPARENCY, 255,RGB(0, 0, 255));
{ Combine BitmapSrc with BitmapDst, with fade mask bitmap }
LEADImage1.FeatherAlphaBlendExt(XDst, YDst, XSize, YSize, LEADImage2.Bitmap, XSrc, YSrc, LEADImage3.Bitmap, XDst, YDst);
LEADImage2.Bitmap:= 0;
LEADImage3.Bitmap:= 0;
end;