SetStretchBltMode的用法
2013-02-20 12:08
453 查看
设置设备拷贝图片时的默认缩放模式
int SetStretchBltMode(__in HDC hdc,__in int iStretchMode);
hdc: 需要更改模式的DC句柄
iStretchMode: 缩放模式
BLACKONWHITE | Performs a Boolean AND operation usingthe color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels.使用消除和现在的像素颜色值进行逻辑AND(与)操作运算。如果该位图是单色位图,那么该模式以牺牲白色像素为代价,保留黑色像素点。 |
COLORONCOLOR | Deletes the pixels. This mode deletesall eliminated lines of pixels without trying to preserve their information.删除像素。该模式删除所有消除的像素行,不保留其信息。 |
HALFTONE | Maps pixels from the source rectangleinto blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.After setting the HALFTONE stretching mode,an application must call the SetBrushOrgEx functionto set the brush origin. If it fails to do so, brush misalignment occurs.将源矩形区中的像素映射到目标矩形区的像素块中,覆盖目标像素块的一般颜色与源像素的颜色接近。在设置完HALFTONE拉伸模之后,应用程序必须调用SetBrushOrgEx函数来设置刷子的起始点。如果没有成功,那么会出现刷子没对准的情况。 |
STRETCH_ANDSCANS | Same as BLACKONWHITE. |
STRETCH_DELETESCANS | Same as COLORONCOLOR. |
STRETCH_HALFTONE | Same as HALFTONE. |
STRETCH_ORSCANS | Same as WHITEONBLACK. |
WHITEONBLACK | Performs a Boolean OR operation usingthe color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.使用颜色值进行逻辑OR(或)操作,如果该位图为单色位图,那么该模式以牺牲黑色像素为代价,保留白色像素点。 |
相关文章推荐
- 解决位图失真-SetStretchBltMode
- BitBlt 函数 详解, StretchBlt、SetStretchBltMode、SetBrushOrgEx 按句柄截图、直接截取缩略图
- 使用StretchBlt之前一定要用SetStretchBltMode(COLORONCOLOR)
- SetStretchBltMode() 防止图片失真
- SetStretchBltMode() 防止图片失真
- SetStretchBltMode-WINDOWS API
- StretchBlt、SetSTretchBltMode - [Daliy APIs]
- 使用StretchBlt之前一定要用SetStretchBltMode(COLORONCOLOR)
- 解决VC中图像缩小失真的问题:利用CDC::SetStretchBltMode
- 使用StretchBlt之前一定要用SetStretchBltMode(COLORONCOLOR)
- VC++ MFC 中的SelectPalette()函数和SetStretchBltMode()函数
- SetSTretchBltMode解决图像失真问题
- StretchBlt之前防止图片失真SetStretchBltMode(COLORONCOLOR);
- SetStretchBltMode-WINDOWS API
- StretchBlt、SetSTretchBltMode
- vc代码显示图像的质量问题,SetStretchBltMode的作用
- SetStretchBltMode
- SetStretchBltMode
- 解决位图失真-SetStretchBltMode()
- SetStretchBltMode函数的问题