AlphaBlend缩放锯齿问题,请指教!!!

叶恭介叶恭介 2021-01-22 10:00:05
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
...全文
295 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
叶恭介叶恭介 2021-01-22
  • 打赏
  • 举报
回复
没效。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这种插值方式。
zgl7903 2021-01-22
  • 打赏
  • 举报
回复
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 应该可以有效

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧