|
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Graphics::TBitmap *pBitmap = new Graphics::TBitmap();
try
{
pBitmap->LoadFromFile("C:\\Program Files\\Common Files\\Borland Shared\\Images\\Splash\\256color\\factory.bmp ");
pBitmap->Transparent = true;
pBitmap->TransparentColor = pBitmap->Canvas->Pixels[50,50];
Form1->Canvas->Draw(0,0,pBitmap);
pBitmap->TransparentMode = tmAuto;
Form1->Canvas->Draw(50,50,pBitmap);
}
catch (...)
{
ShowMessage("Could not load or display bitmap");
}
delete pBitmap;
}
빌더의 transparentcolor 에대한 예제입니다.끝.
이단자 님이 쓰신 글 :
: 말그대로... 두개의 TBitmap 객제 a,b가 있으면
:
: a에 b의 이미지를 복사할때 흰색은 복사하지 않으며 복사하는 방법 아시면 좀 가르쳐 주세요
:
: 어떻게 해야 할지...
|