FeatherAlphaBlendExt example for C++Builder
{
int XDst;
int YDst;
int XSize;
int YSize;
int XSrc;
int YSrc;
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= (int)(LEADImage1->BitmapWidth / 8);
YDst= (int)(LEADImage1->BitmapHeight / 8);
/* Use the half size of the source bitmap */
XSize= (int)(LEADImage2->BitmapWidth / 2);
YSize= (int)(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;
}