|
||||
|
|
|||
int x,y,FirstX; bool LastBeen; HRGN ComplexRGN,TempRGN; ComplexRGN=CreateRectRgn(10,10,10,10); for(y=0;y<Bitmap->Height;y++) {FirstX=0;LastBeen=false; for(x=0;x<Bitmap->Width;x++) {if((abs(Bitmap->Canvas->Pixels[x][y] - TransparentColor)>Range)) {if(!LastBeen) {LastBeen=true;FirstX=x;}} else{if(LastBeen){ LastBeen=false; TempRGN=CreateRectRgn(FirstX,y,x,y+1); CombineRgn(ComplexRGN,ComplexRGN,TempRGN,RGN_OR); DeleteObject(TempRGN);}}}} SetWindowRgn(Form1->Handle,ComplexRGN,true); |
||||
|
|
Copyright © 2001-2005 Sergey Filimonoff. All Rights Reserved.