Technical Exchange.
First, check the possible values:
Cmblackness = blackness; effecstinvert = regular; cmergecopy = mergecopy; cmergepaint = mergepaint; Sequence = notsrccopy; Sequence = NOTSRCERASE; Sequence = patcopy; Sequence = sequence; cmpatpaint = patpaint; Sequence = srcand; cmsrccopy = srccopy; cmsrcerase = srcerase; cmsrcinvert = SRCINVERT; cmsrcpaint = srcpaint; cmwhiteness = whiteness;
See the results. Come on.CodeTry:
Procedure construct (Sender: tobject); var RC1, RC2: trect; begin RC1: = rect (, img1.width, img1.height); RC2: = rect (, img2.width, img2.height ); with img2.canvas do begin copymode: = cmblackness; // modify the copyrect (RC1, img1.canvas, RC2); end;
To get a table:
Source image
| Copymode |
Effect |
| Blackness |
Fill the area of the target rectangle with black. |
| Whiteness |
Fill the target rectangular area with white |
| Dstinvert |
Invert the target rectangular Image |
| Mergecopy |
Boolean and "operations on the source rectangular image and the specified pattern |
| Mergepaint |
After the source rectangular image is reversed, a Boolean OR "operation is performed on the target rectangular image. |
| Notsrccopy |
After the source rectangular image is reversed, it is copied to the target rectangle. |
| NOTSRCERASE |
Perform Boolean OR "operations on the source and target rectangular images, and then reverse the obtained images. |
| Patcopy |
Copy the specified pattern brush to the target rectangle. |
| Patinvert |
Returns the Boolean "XOR" operation between the specified pattern brush and the target rectangular image. |
| Patpaint |
First, the source rectangular image is reversed, and a Boolean OR "operation is performed with the specified pattern brush, perform Boolean OR "srcand" operations on the source and target rectangular images "and" operations on the target rectangular images |
| Srccopy |
Copy the source rectangle image directly to the target rectangle. |
| Srcerase |
Invert the target rectangular image, and then perform Boolean and "operations on the source rectangular Image |
| SRCINVERT |
Boolean "XOR" Operation on the source and target rectangular images |
| Srcpaint |
Boolean OR "Operation on the source and target rectangular images |
Good. Bye