The four basic interactions are:
Case 1: Source and Pattern are opaque.
Return ROP3 ( Dest, Src, Texture ).
Case 2: Source is opaque, Pattern is transparent.
Temporary_ROP3 = ROP3 ( Dest, Src, Texture ). Image_A = Temporary_ROP3, & Not Src. Image_B = Temporary_ROP3 & Pattern. Image_C = Not Pattern & Src & Dest.
Return Image_A Image_B Image_C
Case 3: Source is transparent, Pattern is opaque.
Temporary_ROP3 = ROP3 ( Dest, Src, Texture ).
Image_A = Temporary_ROP3 & Src.
Image_B = Dest & Not Src.
Return Image_A Image_B
Case 4: Source and Pattern are transparent
Temporary_ROP3 = ROP3 ( Dest, Src, Texture ). Image_A = Temporary_ROP3 & Src & Pattern. Image_B = Dest & Not Src.
Image_C = Dest & Not Pattern.
Return Image_A Image_B Image_C.