Enum HwmfTernaryRasterOp

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<HwmfTernaryRasterOp>

    public enum HwmfTernaryRasterOp
    extends java.lang.Enum<HwmfTernaryRasterOp>
    Each ternary raster operation code represents a Boolean operation in which the values of the pixels in the source, the selected brush, and the destination are combined. Following are the three operands used in these operations.
    DDestination bitmap
    PSelected brush (also called pattern)
    SSource bitmap
    Following are the Boolean operators used in these operations.
    aBitwise AND
    nBitwise NOT (inverse)
    oBitwise OR
    xBitwise exclusive OR (XOR)
    All Boolean operations are presented in reverse Polish notation. For example, the following operation replaces the values of the pixels in the destination bitmap with a combination of the pixel values of the source and brush: PSo. The following operation combines the values of the pixels in the source and brush with the pixel values of the destination bitmap: DPSoo (there are alternative spellings of some functions, so although a particular spelling MAY NOT be listed in the enumeration, an equivalent form SHOULD be). Each raster operation code is a 32-bit integer whose high-order word is a Boolean operation index and whose low-order word is the operation code. The 16-bit operation index is a zero-extended, 8-bit value that represents the result of the Boolean operation on predefined brush, source, and destination values. For example, the operation indexes for the PSo and DPSoo operations are shown in the following list.
    The operation indexes are determined by reading the binary values in a column of the table from the bottom up. For example, in the PSo column, the binary value is 11111100, which is equivalent to 00FC (hexadecimal is implicit for these values), which is the operation index for PSo. Using this method, DPSoo can be seen to have the operation index 00FE. Operation indexes define the locations of corresponding raster operation codes in the preceding enumeration. The PSo operation is in line 252 (0x00FC) of the enumeration; DPSoo is in line 254 (0x00FE). The most commonly used raster operations have been given explicit enumeration names, which SHOULD be used; examples are PATCOPY and WHITENESS. When the source and destination bitmaps are monochrome, a bit value of 0 represents a black pixel and a bit value of 1 represents a white pixel. When the source and the destination bitmaps are color, those colors are represented with red green blue (RGB) values.