AlphaBlend(HDC hdcDest,int nXOriginDest,int nYOriginDest,int nWidthDest,int hHeightDest,HDC hdcSrc,int nXOriginSrc,int nYOriginSrc,int nWidthSrc,int nHeightSrc,BLENDFUNCTION blendFunction);
當nWidthDest,hHeightDest不等于 nWidthSrc,int nHeightSrc即發生縮放時,有鋸齒發生,這怎么修改呢,沒看到有方法去設定這縮放的演算法。
CDC::SetStretchBltMode就有STRETCH_HALFTONE
uj5u.com熱心網友回復:
GdiAlphaBlend function看注釋部分
If the source rectangle and destination rectangle are not the same size, the source bitmap is stretched to match the destination rectangle. If the SetStretchBltMode function is used, the iStretchMode value is automatically converted to COLORONCOLOR for this function (that is, BLACKONWHITE, WHITEONBLACK, and HALFTONE are changed to COLORONCOLOR).
因此 SetStretchBltMode 應該可以有效
uj5u.com熱心網友回復:
沒效。If the SetStretchBltMode function is used, the iStretchMode value is automatically converted to COLORONCOLOR for this function (that is, BLACKONWHITE, WHITEONBLACK, and HALFTONE are changed to COLORONCOLOR)。這句話的意思是說這函式會強制使用COLORONCOLOR這種插值方式。轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/251129.html
標籤:界面
