TransparentBlt()関数


BOOL TransparentBlt(
 HDC hdcDest,
 int nXOriginDest,
 int nYOriginDest,
 int nWidthDest,
 int hHeightDest,
 HDC hdcSrc,
 int nXOriginSrc,
 int nYOriginSrc,
 int nWidthSrc,
 int nHeightSrc,
 UINT crTransparent
);

TransparentBltでは透明さを考慮しています。
clrTransparentで示されるRGBカラーは転送で透明に表示されます。
反転することはできません。
開発環境の設定によってはmsimg32.libファイルをリンカにインポートする必要があります。

hdcSrc転送先デバイスコンテキストへのハンドル。
xDest転送先四角形の左上隅のx座標。
yDest転送先四角形の左上隅のy座標。
nDestWidth転送先四角形の幅。
nDestHeight転送先四角形の高さ。
hdcSrc転送元デバイスコンテキストへのハンドル。
xSrc転送元四角形のx座標。
ySrc転送元四角形のy座標。
nSrcWidth転送元四角形の幅。
nSrcHeight転送元四角形の高さ。
clrTransparent透明なビットマップとして扱うための転送元ビットマップのRGBカラー。



TransparentBlt( hmdc, x, y, bitmap.bmWidth, bitmap.bmHeight,
hbitdc, 0, 0, bitmap.bmWidth, bitmap.bmHeight, RGB( 0, 255, 0 ) );

Windows > グラフィック | comments (0) | trackbacks (0)

Comments

Comment Form

icons:

Trackbacks