- Main Page
- Packages
- Classes
- Files
- Related Pages

- Packages
- Package Functions

# Package smjg.libs.sdwf.rop

Raster operations. More...

## Enumerations
enum | ROP2 { DEST = 10, DEST = cast(byte) 0xAA, DEST = 0xAAAA0000, PEN = 12, BLACK = 0, NOTMERGEPEN = 1, MASKNOTPEN = 2, NOTCOPYPEN = 3, MASKPENNOT = 4, NOT = 5, XORPEN = 6, NOTMASKPEN = 7, MASKPEN = 8, NOTXORPEN = 9, NOP = 10, MERGENOTPEN = 11, COPYPEN = 12, MERGEPENNOT = 13, MERGEPEN = 14, WHITE = 15 }
| The ROP2 enumeration contains binary raster operations. More...
enum | ROP3 { DEST = 10, DEST = cast(byte) 0xAA, DEST = 0xAAAA0000, SOURCE = cast(byte) 0xCC, SOURCE = 0xCCCC0000, PATTERN = cast(byte) 0xF0, PATTERN = 0xF0F00000, BLACKNESS = cast(byte) 0x00, NOTSRCERASE = cast(byte) 0x11, NOTSRCCOPY = cast(byte) 0x33, SRCERASE = cast(byte) 0x44, DSTINVERT = cast(byte) 0x55, PATINVERT = cast(byte) 0x5A, SRCINVERT = cast(byte) 0x66, SRCAND = cast(byte) 0x88, MERGECOPY = cast(byte) 0xC0, SRCCOPY = cast(byte) 0xCC, MERGEPAINT = cast(byte) 0xBB, SRCPAINT = cast(byte) 0xEE, PATCOPY = cast(byte) 0xF0, PATPAINT = cast(byte) 0xFB, WHITENESS = cast(byte) 0xFF }
enum | ROP4 { DEST = 10, DEST = cast(byte) 0xAA, DEST = 0xAAAA0000, SOURCE = cast(byte) 0xCC, SOURCE = 0xCCCC0000, PATTERN = cast(byte) 0xF0, PATTERN = 0xF0F00000, MASK = 0x00FF0000, FORECOPY = 0xAACC0000, FORECOPY_BACKINVERT = 0x66CC0000, FORECOPY_BACKPATTERN = 0xF0CC0000 }
| The ROP4 enumeration contains quaternary raster operations. More...
## Functions
ROP4 | Rop4 (ROP3 fore, ROP3 back)
| Constructs a quaternary ROP from foreground and background ternary ROPs.
## Variables
const uint[256] | Rop3
| Gives the 32-bit form of each raster operation, for passing directly to a Windows API function.

## Detailed Description

Raster operations.

The smjg.libs.sdwf.rop module contains a few enumerations and other entities to generate raster operations (ROPs). Raster operations are used in various graphics operations to determine how to combine pixels in a source image with those already in place.

The enumerated types are designed so that arbitrary boolean functions of the ROP components can be created using bitwise operations.

Since:
  0.5

## Enumeration Type Documentation

enum smjg::libs::sdwf::rop::ROP2

The ROP2 enumeration contains binary raster operations.

Binary ROPs are used by the DC.rop property, used in drawing lines, curves and filled shapes. When calling a Windows API function directly, add 1 to the value here.

The DEST and PEN values represent the basic components of a binary ROP.

Since:
  0.5

Enumerator:

  DEST | destination (existing drawing)
  DEST | destination (existing drawing)
  DEST | destination (existing drawing)
  PEN | pen (object being drawn)
  BLACK |
  NOTMERGEPEN | ~(DEST | PEN)
  MASKNOTPEN | DEST & ~PEN.
  NOTCOPYPEN | ~PEN
  MASKPENNOT | ~DEST & PEN
  NOT | ~DEST
  XORPEN | DEST ^ PEN.
  NOTMASKPEN | ~(DEST & PEN)
  MASKPEN | DEST & PEN.
  NOTXORPEN | ~(DEST ^ PEN)
  NOP | DEST.
  MERGENOTPEN | DEST | ~PEN.
  COPYPEN | PEN (the default).
  MERGEPENNOT | ~DEST | PEN
  MERGEPEN | DEST | PEN.
  WHITE |

enum smjg::libs::sdwf::rop::ROP3

Ternary ROPs are used by bit-block transfer functions. When calling a Windows API function directly, use the value here as an index into the Rop3 array.

The DEST, SOURCE and PATTERN values represent the basic components of a ternary ROP.

Since:
  0.5

Enumerator:

  DEST | destination (existing drawing)
  DEST | destination (existing drawing)
  DEST | destination (existing drawing)
  SOURCE | source (image being transferred)
  SOURCE | source (image being transferred)
  PATTERN | pattern (active brush)
  PATTERN | pattern (active brush)
  BLACKNESS |
  NOTSRCERASE | ~(DEST | SOURCE)
  NOTSRCCOPY | ~SOURCE
  SRCERASE | ~DEST & SOURCE
  DSTINVERT | ~DEST
  PATINVERT | DEST ^ PATTERN.
  SRCINVERT | DEST ^ SOURCE.
  SRCAND | DEST & SOURCE.
  MERGECOPY | PATTERN & SOURCE.
  SRCCOPY | SOURCE (generally the default).
  MERGEPAINT | DEST | ~SOURCE.
  SRCPAINT | DEST | SOURCE.
  PATCOPY | PATTERN.
  PATPAINT | DEST | ~SOURCE | PATTERN.
  WHITENESS |

enum smjg::libs::sdwf::rop::ROP4

The ROP4 enumeration contains quaternary raster operations.

Quaternary ROPs are used by masked bit-block transfer functions. These values can be passed into a Windows API function directly.

The DEST, SOURCE, PATTERN and MASK values represent the basic components of a quaternary ROP.

Since:
  0.5

Enumerator:

  DEST | destination (existing drawing)
  DEST | destination (existing drawing)
  DEST | destination (existing drawing)
  SOURCE | source (image being transferred)
  SOURCE | source (image being transferred)
  PATTERN | pattern (active brush)
  PATTERN | pattern (active brush)
  MASK | mask
  FORECOPY | transfer foreground
  FORECOPY_BACKINVERT | transfer foreground, XOR background
  FORECOPY_BACKPATTERN | transfer foreground, use brush as background

## Function Documentation

ROP4 smjg.libs.sdwf.rop.Rop4 | ( | ROP3 | fore,
|  | ROP3 | back |
| ) |  |  |

Constructs a quaternary ROP from foreground and background ternary ROPs.

Parameters:

  | fore | foreground ROP, corresponding to bit value 1 in mask
  | back | background ROP, corresponding to bit value 0 in mask

Returns:
  the constructed quaternary ROP.

Since:
  0.5

## Variable Documentation

const uint [256] smjg::libs::sdwf::rop.Rop3

Gives the 32-bit form of each raster operation, for passing directly to a Windows API function.

Since:
  0.5