网站首页  词典首页

请输入您要查询的函数:

 

术语 setrop2
释义 SetROP2
语法:
int SetROP2(
__in HDC hdc,
__in int fnDrawMode
);
SetROP2函数
该SetROP2函数设置当前前景色混合模式。 GDI的使用前景混合模式组合已经在屏幕上,并与笔的颜色填充对象的内部。前台混合模式定义了如何从刷或笔和现有图像中的颜色颜色结合起来。
参数
hdc [in]
一个句柄,设备上下文。
fnDrawMode [in]
在混合模式。此参数可以是下列值之一。
混合modeMeaning
R2_BLACKPixel始终为0。
R2_COPYPENPixel是笔的颜色。
R2_MASKNOTPENPixel是一个共同的颜色都在屏幕和笔逆组合。
R2_MASKPENPixel是双方共同的颜色笔和屏幕的组合。
R2_MASKPENNOTPixel是双方共同的颜色笔和屏幕的逆组合。
R2_MERGENOTPENPixel是屏幕的色彩组合和笔的颜色相反。
R2_MERGEPENPixel是笔的颜色组合,以及屏幕的颜色。
R2_MERGEPENNOTPixel是笔颜色组合,以及屏幕的颜色相反。
R2_NOPPixel保持不变。
R2_NOTPixel是在屏幕的颜色相反。
R2_NOTCOPYPENPixel是笔的颜色相反。
R2_NOTMASKPENPixel是R2_MASKPEN颜色逆。
R2_NOTMERGEPENPixel是R2_MERGEPEN颜色逆。
R2_NOTXORPENPixel是R2_XORPEN颜色逆。
R2_WHITEPixel始终为1。
R2_XORPENPixel是在笔的颜色组合,并在屏幕上,而不是两个。
返回值
如果函数成功,返回值指定前混合模式。
如果函数失败,返回值是零。
备注
混合模式定义如何GDI的源和目标相结合时的颜色与当前钢笔画。混合模式的二元光栅操作码,代表所有可能的两个变量的布尔函数,使用二进制行动和,OR和XOR(异或)和一元的操作方法。在混合模式是唯一的光栅器件,它不是矢量设备可用。
实例
有关示例,请参阅使用矩形。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
绘画和绘图概述
绘画和绘图功能
GetROP2
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetROP2 Function
The SetROP2 function sets the current foreground mix mode. GDI uses the foreground mix mode to combine pens and interiors of filled objects with the colors already on the screen. The foreground mix mode defines how colors from the brush or pen and the colors in the existing image are to be combined.
Syntax
int SetROP2(
__in HDC hdc,
__in int fnDrawMode
);
Parameters
hdc [in]
A handle to the device context.
fnDrawMode [in]
The mix mode. This parameter can be one of the following values.
Mix modeMeaning
R2_BLACKPixel is always 0.
R2_COPYPENPixel is the pen color.
R2_MASKNOTPENPixel is a combination of the colors common to both the screen and the inverse of the pen.
R2_MASKPENPixel is a combination of the colors common to both the pen and the screen.
R2_MASKPENNOTPixel is a combination of the colors common to both the pen and the inverse of the screen.
R2_MERGENOTPENPixel is a combination of the screen color and the inverse of the pen color.
R2_MERGEPENPixel is a combination of the pen color and the screen color.
R2_MERGEPENNOTPixel is a combination of the pen color and the inverse of the screen color.
R2_NOPPixel remains unchanged.
R2_NOTPixel is the inverse of the screen color.
R2_NOTCOPYPENPixel is the inverse of the pen color.
R2_NOTMASKPENPixel is the inverse of the R2_MASKPEN color.
R2_NOTMERGEPENPixel is the inverse of the R2_MERGEPEN color.
R2_NOTXORPENPixel is the inverse of the R2_XORPEN color.
R2_WHITEPixel is always 1.
R2_XORPENPixel is a combination of the colors in the pen and in the screen, but not in both.

Return Value
If the function succeeds, the return value specifies the previous mix mode.
If the function fails, the return value is zero.
Remarks
Mix modes define how GDI combines source and destination colors when drawing with the current pen. The mix modes are binary raster operation codes, representing all possible Boolean functions of two variables, using the binary operations AND, OR, and XOR (exclusive OR), and the unary operation NOT. The mix mode is for raster devices only; it is not available for vector devices.
Examples
For an example, see Using Rectangles .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Painting and Drawing Overview
Painting and Drawing Functions
GetROP2
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145088(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:15:57