|
아래의
pBitmap->TransparentColor = pBitmap->Canvas->Pixels[50,50];
부분을 수정하시면 됩니다.
TColor tcTransParent = (TColor)RGB(0, 255, 0);
pBitmap->TransparentColor = tcTransParent;
비교적 간단하죠..? ^^;
슈퍼브라더 님이 쓰신 글 :
: 유영인 [Chris] 님이 쓰신 글 :
: : VCL 도움말 입니다. --;
: :
: :
: : 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;
: : }
:
: 그 도움말도 봤었는데...
:
: 제가 알구 싶은건 에디트창에서 R,G,B값을 각각 입력 받아서... 그 RGB값이 투명색이되서
:
: bmp파일이 나타나게 하는 방법을 알구 싶습니다..
:
: 예를들어 RGB(0,255,0)이런 값입니다...
:
: 프밍고수님들의 답변을 기다립니다...
:
:
:
|