?? bitmap.hpp
字號(hào):
#define BLITCLIP() \
\
{ if( sx >= width || sy >= height || ( sx + w ) <= 0 || ( sy + h ) <= 0 ) \
return; \
\
int dcl, dct, dcb, dcr; \
\
if( sx < 0 ){ \
x -= sx; \
w += sx; \
sx = 0; \
} \
if( sy < 0 ){ \
y -= sy; \
h += sy; \
sy = 0; \
} \
if( sx+w > width ){ \
w = width - sx; \
} \
if( sy+h > height ){ \
h = height - sy; \
} \
\
if( dest->clip ){ \
dcl = dest->cl; \
dct = dest->ct; \
dcr = dest->cr; \
dcb = dest->cb; \
} \
else{ \
dcl = dct = 0; \
dcb = dest->height; \
dcr = dest->width; \
} \
if( x >= dcr || y >= dcb \
|| ( x + w ) <= dcl || ( y + h ) <= dct ) \
return; \
\
if( x < dcl ){ \
sx += dcl - x; \
w -= dcl - x; \
x = dcl; \
} \
if( y < dct ){ \
sy += dct - y; \
h -= dct - y; \
y = dct; \
} \
if( x + w > dcr ) \
w = dcr - x; \
if( y + h > dcb ) \
h = dcb - y; }
#define BLITMASK( n ) \
\
void Bitmap##n::BlitMask( Bitmap* dest, int x, int y, int sx, int sy, int w, int h ) \
{ \
BLITCLIP() \
\
if( dest == this ) \
return; /*failed */ \
else{ \
BlitMasked##n( (Bitmap##n*)dest, x, y, sx, sy, w, h ); \
} \
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -