void transparent_fillrectangle(int sx,int sy,int ex,int ey)
{
//setcolor(RGB(72,100,122));
rectangle(sx,sy,ex,ey);
//setfillcolor(RGB(94,114,128));
COLORREF rtColor=getfillcolor();
BYTE R=(1-TRANSPARENCY)*GetRValue(rtColor),
G=(1-TRANSPARENCY)*GetGValue(rtColor),
B=(1-TRANSPARENCY)*GetBValue(rtColor),
NR,NG,NB;
if(sx>ex)itemp(&sx,&ex);
if(sy>ey)itemp(&sy,&ey);
for(int dx=sx+1;dx<=ex-1;dx++)
for(int dy=sy+1;dy<=ey-1;dy++)
{
rtColor=getpixel(dx,dy);
NR=R+TRANSPARENCY*GetRValue(rtColor);if(NR>255)NR=255;
NG=G+TRANSPARENCY*GetGValue(rtColor);if(NG>255)NG=255;
NB=B+TRANSPARENCY*GetBValue(rtColor);if(NB>255)NB=255;
putpixel(dx,dy,RGB(NR,NG,NB));
}
}
{
//setcolor(RGB(72,100,122));
rectangle(sx,sy,ex,ey);
//setfillcolor(RGB(94,114,128));
COLORREF rtColor=getfillcolor();
BYTE R=(1-TRANSPARENCY)*GetRValue(rtColor),
G=(1-TRANSPARENCY)*GetGValue(rtColor),
B=(1-TRANSPARENCY)*GetBValue(rtColor),
NR,NG,NB;
if(sx>ex)itemp(&sx,&ex);
if(sy>ey)itemp(&sy,&ey);
for(int dx=sx+1;dx<=ex-1;dx++)
for(int dy=sy+1;dy<=ey-1;dy++)
{
rtColor=getpixel(dx,dy);
NR=R+TRANSPARENCY*GetRValue(rtColor);if(NR>255)NR=255;
NG=G+TRANSPARENCY*GetGValue(rtColor);if(NG>255)NG=255;
NB=B+TRANSPARENCY*GetBValue(rtColor);if(NB>255)NB=255;
putpixel(dx,dy,RGB(NR,NG,NB));
}
}