SetStretchBltMode的用法

设置设备拷贝图片时的默认缩放模式

int SetStretchBltMode(
  __in  HDC hdc,
  __in  int iStretchMode
);

hdc: 		需要更改模式的DC句柄
iStretchMode:	缩放模式


  
  
BLACKONWHITE

Performs a Boolean AND operation using the 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 deletes all eliminated lines of pixels without trying to preserve their information.

删除像素。该模式删除所有消除的像素行,不保留其信息。

HALFTONE

Maps pixels from the source rectangle into 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 function to 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 using the 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(或)操作,如果该位图为单色位图,那么该模式以牺牲黑色像素为代价,保留白色像素点。

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值