Memblt Operation Code

在[MS-RDPEGDI]中对Operation Code的描述太过玄妙了,用S、D、P还有AND,OR,NOT 和 XOR 来表示Operation的具体动作。每次看都感觉一脸懵逼。这回是解决一个Customer Issue,发现以前没有实现的一个Operation。看了文档感觉解读不能,看FreeRDP的源代码,最后只能找到API级别的,内部如何实现的无从得知,这样也就没法在前端实现了。于是搜索了一大圈,找到了微软在Gdiplus.cs这个文件中的枚举类型和注释。解释的清晰明了,早这样写不就好了........

传送门

不过根据微软的特点,这个链接大概率的在若干年后就会失效。所以我还是把需要的这部分粘贴过来。而且这些Code我已经重新排过版了,每一个都按照顺序对应了[MS-RDPEGDI]中的Operation Code。

BLACKNESS          = 0x00000042, /* dest = BLACK                    */ ==== 0x00
NOTSRCERASE        = 0x001100A6, /* dest = (NOT src) AND (NOT dest) */ ==== 0x11
NOTSRCCOPY         = 0x00330008, /* dest = (NOT source)             */ ==== 0x33
SRCERASE           = 0x00440328, /* dest = source AND (NOT dest )   */ ==== 0x44
DSTINVERT          = 0x00550009, /* dest = (NOT dest)               */ ==== 0x55
PATINVERT          = 0x005A0049, /* dest = pattern XOR dest         */ ==== 0x5A
SRCINVERT          = 0x00660046, /* dest = source XOR dest          */ ==== 0x66
SRCAND             = 0x008800C6, /* dest = source AND dest          */ ==== 0x88
MERGEPAINT         = 0x00BB0226, /* dest = (NOT source) OR dest     */ ==== 0xBB
MERGECOPY          = 0x00C000CA, /* dest = (source AND pattern)     */ ==== 0xC0
SRCCOPY            = 0x00CC0020, /* dest = source                   */ ==== 0xCC
SRCPAINT           = 0x00EE0086, /* dest = source OR dest           */ ==== 0xEE
PATCOPY            = 0x00F00021, /* dest = pattern                  */ ==== 0xF0
PATPAINT           = 0x00FB0A09, /* dest = DPSnoo                   */ ==== 0xFB
WHITENESS          = 0x00FF0062, /* dest = WHITE                    */ ==== 0xFF

End

你可能感兴趣的:(Memblt Operation Code)