SetRgnFromMask example for C++ Builder
/*This example sets and colored a region into LEADImage1 using a 1-bit black-and-white mask image.*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet= LEADImage1->Load("IMAGE1.CMP", 0, 1, 1);
if(nRet == SUCCESS)
{
nRet= LEADMask->Load ("MASK.TIF", 0, 1, 1);
if(nRet == SUCCESS)
{
LEADImage1->MaskBitmap= LEADMask->Bitmap;
LEADImage1->SetRgnFromMask(L_RGN_SET);
LEADImage1->Fill(RGB(0, 255, 0));
}
}
}