概述
根据nDrawMode设置的方式重新设定绘图的方式,下面就不同的nDrawMode值具体解释绘图模式是如何改变的。 首先就nDrawMode的取值有以下的情况:
1、R2_BLACKPixel is always black. //所有绘制出来的像素为黑色
2、R2_WHITEPixel is always white. //所有绘制出来的像素为白色
3、R2_NOPPixel remains unchanged. //任何绘制将不改变当前的状态
4、R2_NOTPixel is the inverse of the screen color. //当前绘制的像素值设为屏幕像素值的反,这样可以覆盖掉上次的绘图,(自动擦除上次绘制的图形)
5、R2_COPYPENPixel is the pen color. //使用当前的画笔的颜色
6、R2_NOTCOPYPENPixel is the inverse of the pen color. //当前画笔的反色 //下面是当前画笔的颜色和屏幕色的组合运算得到的绘图模式。
7、R2_MERGEPENNOTPixel is a combination of the pen color and the inverse of the screen color (final pixel = (NOT screen pixel) OR pen). //R2_COPYPEN和R2_NOT的并集
8、R2_MASKPENNOTPixel is a combination of the colors common to both the pen and the inverse of the screen (final pixel = (NOT screen pixel) AND pen). //R2_COPYPEN和R2_NOT的交集
9、R2_MERGENOTPENPixel is a combination of the screen color and the inverse of the pen color (final pixel = (NOT pen) OR screen pixel). //R2_NOTCOPYPEN和屏幕像素值的并集
10、R2_MASKNOTPENPixel is a combination of the colors common to both the screen and the inverse of the pen (final pixel = (NOT pen) AND screen pixel). //R2_NOTCOPYPEN和屏幕像素值的交集
11、R2_MERGEPENPixel is a combination of the pen color and the screen color (final pixel = pen OR screen pixel). //R2_COPYPEN和屏幕像素值的并集
12、R2_NOTMERGEPENPixel is the inverse of the R2_MERGEPEN color (final pixel = NOT(pen OR screen pixel)). //R2_MERGEPEN的反色
13、R2_MASKPENPixel is a combination of the colors common to both the pen and the screen (final pixel = pen AND screen pixel). //R2_COPYPEN和屏幕像素值的交集
14、R2_NOTMASKPENPixel is the inverse of the R2_MASKPEN color (final pixel = NOT(pen AND screen pixel)). //R2_MASKPEN的反色
15、R2_XORPENPixel is a combination of the colors that are in the pen or in the screen, but not in both (final pixel = pen XOR screen pixel). //R2_COPYPEN和屏幕像素值的异或
16、R2_NOTXORPENPixel is the inverse of the R2_XORPEN color (final pixel = NOT(pen XOR screen pixel)). //R2_XORPEN的反色 总之,上述api的一个作用是在需要改变绘图的模式时,不需要重新设置画笔,只需要设置不同的绘图的模式即可达到相应的目的。
转载于:https://www.cnblogs.com/liyoung/archive/2012/06/04/2534785.html
最后
以上就是完美大雁为你收集整理的rop2的全部内容,希望文章能够帮你解决rop2所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复