CImage::Draw 部分のメモ
// AtlImage.h より
inline BOOL CImage::Draw(
_In_ HDC hDestDC,
_In_ int xDest,
_In_ int yDest,
…
{
…
#if WINVER >= 0x0500
if( ((m_iTransparentColor != -1) || (m_clrTransparentColor != (COLORREF)-1)) && IsTransparencySupported() ) {
bResult = ::TransparentBlt( hDestDC, xDest, yDest, … , GetTransparentRGB() ) ;
}
else if( m_bHasAlphaChannel && IsTransparencySupported() ) {
BLENDFUNCTION bf;
bf.BlendOp = AC_SRC_OVER;
bf.BlendFlags = 0;
bf.SourceConstantAlpha = 0xff;
bf.AlphaFormat = AC_SRC_ALPHA;
bResult = ::AlphaBlend( hDestDC, xDest, yDest, … , bf) ;
}
else
#endif // WINVER >= 0x0500
{
bResult = ::StretchBlt( hDestDC, xDest, yDest, … , SRCCOPY) ;
}
…
return( bResult );
}