IIXC_Page::Rop3 Method

From Tracker Software PDF SDK
Revision as of 23:47, 6 May 2015 by Oliynykd (Talk | contribs)

Jump to: navigation, search


The method combines up to three images in different ways using the raster operations codes (ROP3).

Syntax

HRESULT Rop3([in]  RECT*       pRect,
             [in]  IIXC_Page*  srcFrom,
             [in]  LONG        srcX,
             [in]  LONG        srcY,
             [in]  ULONG       srcColor,
             [in]  IIXC_Page*  pPattern,
             [in]  LONG        patX,
             [in]  LONG        patY,
             [in]  ULONG       patColor,
             [in]  UCHAR       ropCode,
             [in]  ULONG       nFlags);

Parameters

pRect
[in] Pointer to RECT specifies the rectangular area on the destination page which will be affected. If NULL then the entire page will be used.
srcFrom
[in] Specifies the IIXC_Page of the source page. This parameter can be NULL (see Comments for details).
srcX
[in] Specifies the x-coordinate of the left-top corner of the affected rectangle in the source page.
srcY
[in] Specifies the y-coordinate of the left-top corner of the affected rectangle in the source page.
srcColor
[in] Specifies the color which should be used if pSource is NULL.
pPattern
[in] Specifies the IIXC_Page of the pattern page. This parameter can be NULL (see Comments for details).
patX
[in] Specifies the x-coordinate of the left-top corner of the affected rectangle in pattern page.
patY
[in] Specifies the y-coordinate of the left-top corner of the affected rectangle in pattern page.
patColor
[in] Specifies the color which should be used if pPattern is NULL.
ropCode
[in] Specifies a ternary raster-operation value. This value determines how BitBlt combines corresponding pixels from the source, destination, and pattern that is used to produce the final pixels in the destination rectangle. This parameter can be any one of 256 ternary raster-operation values; the following lists the most common values:
Constant Value Meaning
SRCCOPY 0xCC = 0xCC
Destination = Source
Copies source bits to the destination rectangle
SRCPAINT 0xAA
Destination = Source | Destination
Combines the source and destination bits using the bitwise OR operator
SRCAND 0x88 = 0xCC & 0xAA
Destination = Source & Destination
Combines the source and destination bits using the bitwise AND operator
SRCINVERT 0x66 = 0xCC ^ 0xAA
Destination = Source ^ Destination
Combines the source and destination bits using the bitwise exclusive OR operator
SRCERASE 0x44 = 0xCC & (~0xAA)
Destination = Source & (~ Destination)
Combines the source and inverse of destination bits using the bitwise AND operator
NOTSRCCOPY 0x33 = ~0xAA
Destination = ~ Destination
Copies the inverse of the destination bits to the destination rectangle
NOTSRCERASE 0x11 = (~0xCC) & (~0xAA)
Destination = (~ Source) & (~ Destination)
Combines the inverse of the source and destination bits using the bitwise AND operator
MERGECOPY 0xC0 = 0xCC & 0xF0
Destination = Source & Pattern
Combines the source and pattern bits using the bitwise AND operator
MERGEPAINT 0xAA
Destination = (~ Source) | Destination
Combines the destination and inverse of the source bits using the bitwise OR operator
PATCOPY 0xF0 = 0xF0
Destination = Pattern
Copies the pattern bits to the destination rectangle
PATPAINT 0x0F | 0xAA
Destination = (~ Source) | Pattern | Destination
Combines the destination, pattern, and the inverse of source bits using the bitwise OR operator
PATINVERT 0x5A = 0xF0 ^ 0xAA
Destination = Pattern ^ Destination
Combines the pattern and destination bits using the bitwise exclusive OR operator
DSTINVERT 0x55 = ~0xAA
Destination = ~ Destination
Copies the inverse of the destination bits
BLACKNESS 0x00
Set all destination bits to black
WHITENESS 0xFF
Set all bits to white
In this table Source was represented as 0xCC, Destination as 0xAA, and Pattern as 0xF0.
nFlags
[in] Combination of flags which specifies how the data will be processed.

Return Value

Returns S_OK if operation was successful or error code in other cases.

Comments

Most raster operations combine all three pages - Destination, Source and Pattern, but some of them do not use Source or Pattern, or either of them. Also, sometimes Source or Pattern are "solid" pages filled by one color. So IMG_PageRop3 supports one extension - if Source or Pattern (or both) handles are NULL the corresponding color will be used for each pixel, instead of getting the pixel value from the page.


See Also

See also IIXC_Page.