This function sets the kind of operation to use for future calls to IG_clipboard_paste_merge_ex().
|
Copy Code
|
|
|---|---|
AT_ERRCOUNT ACCUAPI IG_clipboard_paste_op_set (
HIGEAR hIGear,
AT_MODE nOperation
);
|
|
| Name | Type | Description |
|---|---|---|
| hIGear | HIGEAR | HIGEAR handle of the image that is in the system. |
| nOperation | AT_MODE | An integer constant of type AT_MODE, which will be used in future calls to IG_clipboard_paste_merge_ex(). |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
This function does not process image pixels.
Clipboard, Image Processing
|
Copy Code
|
|
|---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_ERRCOUNT nErrcount /* # of IG errors on the stack */ nErrcount = IG_clipboard_paste_op_set( hIGear, IG_ARITH_AND ); |
|
nOperation is an integer constant of type AT_MODE that is defined in accucnst.h. Here are the possible settings and what kind of operation each one will perform on the values of the merging pixels:
| IG_ARITH_ADD | Img1 = Img1 + Img2 |
| IG_ARITH_SUB | Img1 = Img1 - Img2 |
| IG_ARITH_MULTI | Img1 = Img1 * Img2 |
| IG_ARITH_DIVIDE | Img1 = Img1 / Img2 |
| IG_ARITH_AND | Img1 = Img1 & Img2 |
| IG_ARITH_OR | Img1 = Img1 | Img2 |
| IG_ARITH_XOR | Img1 = Img1 ^ Img2 |
| IG_ARITH_ADD_SIGN_CENTERED | Img1 = Img1 + SC_Img2 |
| IG_ARITH_NOT | Img1 = ~Img1 |
| IG_ARITH_OVER | Img1 = Img2 |
You can also set nOperation to 0, which is the default. This will cause the image in the clipboard to just be copied over the currently loaded image - no merging of intersecting pixel values will occur.