## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Mix Modes

All values are passed to the graphics engine which passes them unchanged to the presentation driver.

Foreground Mix Mode Valid values are:

FM_OR OR
FM_OVERPAINT Overpaint
FM_XOR Exclusive-OR
FM_LEAVEALONE Leave alone (invisible)
FM_AND AND
FM_SUBTRACT (Inverse source) AND destination
FM_MASKSRCNOT Source AND (inverse destination)
FM_ZERO All zeros
FM_NOTMERGESRC Inverse (source OR destination)
FM_NOTXORSRC Inverse (source Exclusive-OR destination)
FM_INVERT Inverse of destination
FM_MERGESRCNOT Source OR (inverse destination)
FM_NOTCOPYSRC Inverse of source
FM_MERGENOTSRC (Inverse source) OR destination
FM_NOTMASKSRC Inverse of (source AND destination)
FM_ONE All ones

Note: FM_DEFAULT is the default value at the API. It is a reserved value and is not passed to the presentation driver.

The presentation driver must support FM_OR, FM_OVERPAINT, FM_XOR, and FM_ LEAVEALONE. Other foreground mixes can be handled as FM_OVERPAINT. Mixing, other than for FM_LEAVEALONE or FM_OVERPAINT, is performed on the physical color index or logical palette index. When an indexed color table or palette has been realized, this corresponds to the logical color index. In other cases, the color resulting from a mix cannot be predicted.

Note: An exception to this rule occurs when the same object is drawn twice with FM_XOR and BM_LEAVEALONE, and no intermediate drawing is performed in other mixes. The implementation must guarantee that this always results in the object being erased cleanly.

Other valid mixes can also be supported for some primitive types. When a valid mix is not supported, the default is FM_OVERPAINT. An error is raised only when the specified mix value is not one of those listed above.

Background Mix Mode Valid values are:

BM_ERROR Error
BM_DEFAULT Default
BM_OR OR
BM_OVERPAINT Overpaint
BM_XOR Exclusive-OR
BM_LEAVEALONE Leave alone (invisible)
BM_SRCTRANSPARENT Provides a transparent overlay function by not copying ( to the output bit map) the pels from the source bit map that match the presentation space background color.
BM_DESTTRANSPARENT Provides a transparent underlay function by copying the pels from the source bit map only to the destination pels that match the presentation space background color.

The presentation driver must support BM_OVERPAINT and BM_LEAVEALONE. Other background mixes can be handled as BM_LEAVEALONE.

GreQueryDeviceCaps allows the application to determine the mixes supported by the device.