Package org.apache.poi.hwmf.record
Enum HwmfTernaryRasterOp
- All Implemented Interfaces:
Serializable,Comparable<HwmfTernaryRasterOp>,java.lang.constant.Constable
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.
Following are the Boolean operators used in these operations.
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.
| Operand | Meaning |
|---|---|
| D | Destination bitmap |
| P | Selected brush (also called pattern) |
| S | Source bitmap |
| Operand | Meaning |
|---|---|
| a | Bitwise AND |
| n | Bitwise NOT (inverse) |
| o | Bitwise OR |
| x | Bitwise exclusive OR (XOR) |
| P | S | D | DPo | DPan |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFills the destination rectangle with blackInverts the colors of the destination areaFills the destination area with (Src and Pattern)Fills the destination area with (Dst or not Src)Fills the destination area with (not Src)Fills the destination area with (not (Dst or Src))Fills the destination area with (Pattern)Fills the destination area with (Dst xor Pattern)Fills the destination area with (Dst or (not Src) or Pattern)Fills the destination area with (Dst and Src)Fills the destination area with SrcFills the destination area with ((not Dst) and Src)Fills the destination area with (Dst xor Src)Combines the colors of the source and the destination using the operator OR on each pixelFills the destination rectangle with white -
Method Summary
Modifier and TypeMethodDescriptioncalcCmd()intintvoidstatic HwmfTernaryRasterOpvalueOf(int opIndex) Returns the enum constant of this type with the specified name.static HwmfTernaryRasterOpReturns the enum constant of this type with the specified name.static HwmfTernaryRasterOp[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
BLACKNESS
Fills the destination rectangle with black -
DPSOON
-
DPSONA
-
PSON
-
SDPONA
-
DPON
-
PDSXNON
-
PDSAON
-
SDPNAA
-
PDSXON
-
DPNA
-
PSDNAON
-
SPNA
-
PDSNAON
-
PDSONON
-
PN
-
PDSONA
-
NOTSRCERASE
Fills the destination area with (not (Dst or Src)) -
SDPXNON
-
SDPAON
-
DPSXNON
-
DPSAON
-
PSDPSANAXX
-
SSPXDSXAXN
-
SPXPDXA
-
SDPSANAXN
-
PDSPAOX
-
SDPSXAXN
-
PSDPAOX
-
DSPDXAXN
-
PDSOX
-
PDSOAN
-
DPSNAA
-
SDPXON
-
DSNA
-
SPDNAON
-
SPXDSXA
-
PDSPANAXN
-
SDPSAOX
-
SDPSXNOX
-
DPSXA
-
PSDPSAOXXN
-
DPSANA
-
SSPXPDXAXN
-
SPDSOAX
-
PSDNOX
-
PSDPXOX
-
PSDNOAN
-
PSNA
-
SDPNAON
-
SDPSOOX
-
NOTSRCCOPY
Fills the destination area with (not Src) -
SPDSAOX
-
SPDSXNOX
-
SDPOX
-
SDPOAN
-
PSDPOAX
-
SPDNOX
-
SPDSXOX
-
SPDNOAN
-
PSX
-
SPDSONOX
-
SPDSNAOX
-
PSAN
-
PSDNAA
-
DPSXON
-
SDXPDXA
-
SPDSANAXN
-
SRCERASE
Fills the destination area with ((not Dst) and Src) -
DPSNAON
-
DSPDAOX
-
PSDPXAXN
-
SDPXA
-
PDSPDAOXXN
-
DPSDOAX
-
PDSNOX
-
SDPANA
-
SSPXDSXOXN
-
PDSPXOX
-
PDSNOAN
-
PDNA
-
DSPNAON
-
DPSDAOX
-
SPDSXAXN
-
DPSONON
-
DSTINVERT
Inverts the colors of the destination area -
DPSOX
-
DPSOAN
-
PDSPOAX
-
DPSNOX
-
PATINVERT
Fills the destination area with (Dst xor Pattern) -
DPSDONOX
-
DPSDXOX
-
DPSNOAN
-
DPSDNAOX
-
DPAN
-
PDSXA
-
DSPDSAOXXN
-
DSPDOAX
-
SDPNOX
-
SDPSOAX
-
DSPNOX
-
SRCINVERT
Fills the destination area with (Dst xor Src) -
SDPSONOX
-
DSPDSONOXXN
-
PDSXXN
-
DPSAX
-
PSDPSOAXXN
-
SDPAX
-
PDSPDOAXXN
-
SDPSNOAX
-
PDSXNAN
-
PDSANA
-
SSDXPDXAXN
-
SDPSXOX
-
SDPNOAN
-
DSPDXOX
-
DSPNOAN
-
SDPSNAOX
-
DSAN
-
PDSAX
-
DSPDSOAXXN
-
DPSDNOAX
-
SDPXNAN
-
SPDSNOAX
-
DPSXNAN
-
SPXDSXO
-
DPSAAN
-
DPSAA
-
SPXDSXON
-
DPSXNA
-
SPDSNOAXN
-
SDPXNA
-
PDSPNOAXN
-
DSPDSOAXX
-
PDSAXN
-
SRCAND
Fills the destination area with (Dst and Src) -
SDPSNAOXN
-
DSPNOA
-
DSPDXOXN
-
SDPNOA
-
SDPSXOXN
-
SSDXPDXAX
-
PDSANAN
-
PDSXNA
-
SDPSNOAXN
-
DPSDPOAXX
-
SPDAXN
-
PSDPSOAXX
-
DPSAXN
-
DPSXX
-
PSDPSONOXX
-
SDPSONOXN
-
DSXN
-
DPSNAX
-
SDPSOAXN
-
SPDNAX
-
DSPDOAXN
-
DSPDSAOXX
-
PDSXAN
-
DPA
-
PDSPNAOXN
-
DPSNOA
-
DPSDXOXN
-
PDSPONOXN
-
PDXN
-
DSPNAX
-
PDSPOAXN
-
DPSOA
-
DPSOXN
-
D
-
DPSONO
-
SPDSXAX
-
DPSDAOXN
-
DSPNAO
-
DPNO
-
PDSNOA
-
PDSPXOXN
-
SSPXDSXOX
-
SDPANAN
-
PSDNAX
-
DPSDOAXN
-
DPSDPAOXX
-
SDPXAN
-
PSDPXAX
-
DSPDAOXN
-
DPSNAO
-
MERGEPAINT
Fills the destination area with (Dst or not Src) -
SPDSANAX
-
SDXPDXAN
-
DPSXO
-
DPSANO
-
MERGECOPY
Fills the destination area with (Src and Pattern) -
SPDSNAOXN
-
SPDSONOXN
-
PSXN
-
SPDNOA
-
SPDSXOXN
-
SDPNAX
-
PSDPOAXN
-
SDPOA
-
SPDOXN
-
DPSDXAX
-
SPDSAOXN
-
SRCCOPY
Fills the destination area with Src -
SDPONO
-
SDPNAO
-
SPNO
-
PSDNOA
-
PSDPXOXN
-
PDSNAX
-
SPDSOAXN
-
SSPXPDXAX
-
DPSANAN
-
PSDPSAOXX
-
DPSXAN
-
PDSPXAX
-
SDPSAOXN
-
DPSDANAX
-
SPXDSXAN
-
SPDNAO
-
SDNO
-
SDPXO
-
SDPANO
-
PDSOA
-
PDSOXN
-
DSPDXAX
-
PSDPAOXN
-
SDPSXAX
-
PDSPAOXN
-
SDPSANAX
-
SPXPDXAN
-
SSPXDSXAX
-
DSPDSANAXXN
-
DPSAO
-
DPSXNO
-
SDPAO
-
SDPXNO
-
SRCPAINT
Combines the colors of the source and the destination using the operator OR on each pixel -
SDPNOO
-
PATCOPY
Fills the destination area with (Pattern) -
PDSONO
-
PDSNAO
-
PSNO
-
PSDNAO
-
PDNO
-
PDSXO
-
PDSANO
-
PDSAO
-
PDSXNO
-
DPO
-
PATPAINT
Fills the destination area with (Dst or (not Src) or Pattern) -
PSO
-
PSDNOO
-
DPSOO
-
WHITENESS
Fills the destination rectangle with white
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
opIndex- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getOpIndex
public int getOpIndex() -
getOpCode
public int getOpCode() -
describeCmd
-
calcCmd
-
process
-