typedef struct tagDRAWMODE {
short Rop2; // see below
short bkMode; // see below
unsigned long bkColor; // see below
unsigned long TextColor; // see below
short TBreakExtra; // see below
short BreakExtra; // see below
short BreakErr; // see below
short BreakRem; // see below
short BreakCount; // see below
short CharExtra; // see below
unsigned long LbkColor; // see below
unsigned long LTextColor; // see below
DWORD ICMCXform; // see below
short StretchBltMode; // see below
DWORD eMiterLimit; // see below
} DRAWMODE;
Contains information used to draw lines, fill interiors, and write text.
R2_BLACK (1) | Black: zero. |
R2_NOTMERGEPEN (2) | Inverse of the bitwise OR of the source and destination colors: NOT (Source OR Dest). |
R2_MASKNOTPEN (3) | Bitwise AND of the destination and the inverse of the source: Dest AND (NOT Source). |
R2_NOTCOPYPEN (4) | Inverse of the source color: NOT Source. |
R2_MASKPENNOT (5) | Bitwise AND of the source and the inverse of the destination: Source AND (NOT Dest). |
R2_NOT (6) | Inverse of the destination color: NOT Dest. |
R2_XORPEN (7) | Bitwise exclusive OR of the destination and source: Dest XOR Source. |
R2_NOTMASKPEN (8) | Inverse of the bitwise AND of the destination and source colors: NOT (Dest AND Source). |
R2_MASKPEN 9 | Bitwise AND of the destination and source colors: Dest AND Source. |
R2_NOTXORPEN (10) | Inverse of the bitwise exclusive OR of the destination and source colors: NOT (Dest XOR Source). |
R2_NOP 11 | Destination color: Dest. |
R2_MERGENOTPEN (12) | Bitwise OR of the destination and the inverse of the source: Dest AND (NOT Source). |
R2_COPYPEN (13) | Source color: Source. |
R2_MERGEPENNOT (14) | Bitwise OR of the source and the inverse of the destination: Source OR (NOT Dest). |
R2_MERGEPEN (15) | Bitwise OR of the source and the destination: Source OR Dest. |
R2_WHITE (16) | White: 1. |
BKMODE_TRANSPARENT (1) Also defined as TRANSPARENT | Leaves destination background unchanged. |
BKMODE_OPAQUE (2) Also defined as OPAQUE | Replaces destination background with the color specified by the bkColor member. |
BKMODE_LEVEL1 (3) | Use Level 1 transparent anti-aliasing. A 1 in the glyph bitmap means that the display driver should blend the color specified in the TextColor member with the current pixel's color. Level 1 is a 25% blend. The blend should be done on the brightness, not the RGB values, and so it must be gamma-corrected. |
BKMODE_LEVEL2 (4) | Use Level 2 transparent anti-aliasing. A 1 in the glyph bitmap means that the display driver should blend the color specified in the TextColor member with the current pixel's color. Level 2 is a 50% blend. The blend should be done on the brightness, not the RGB values, and so it must be gamma-corrected. |
BKMODE_LEVEL3 (5) | Use Level 3 transparent anti-aliasing. A 1 in the glyph bitmap means that the display driver should blend the color specified in the TextColor member with the current pixel's color. Level 3 is a 75% blend. The blend should be done on the brightness, not the RGB values, and so it must be gamma-corrected. |
BKMODE_TRANSLATE (6) | For 8 bpp palettized surfaces only. The TextColor member is a far pointer to a byte array that is used to translate the existing pixel to a new pixel value. Use the current pixel byte as an index into the table to get the pixel's new value. |
Value | Meaning |
---|---|
STRETCH_ANDSCANS (1) | Uses the AND operator to combine eliminated lines with the remaining lines. This mode preserves black pixels at the expense of colored or white pixels. It is the default mode. Also defined as SBM_BLACKONWHITE. |
STRETCH_ORSCANS (2) | Uses the OR operator to combine eliminated lines with the remaining lines. This mode preserves colored or white pixels at the expense of black pixels. Also defined as SBM_WHITEONBLACK. |
STRETCH_DELETESCANS (3) | Deletes the eliminated lines. Information in the eliminated lines is not preserved. Also defined as SBM_COLORONCOLOR. |
STRETCH_HALFTONE (4) | Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels. Also defined as SBM_HALFTONE. |
Output