Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GpiSetMix (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPRIMITIVES
BOOL GpiSetMix(hps, flMixMode)
HPS hps; /* presentation-space handle */
LONG flMixMode; /* color-mixing mode */
The GpiSetMix function sets the current foreground-mix mode. The
foreground-mix mode specifies how the foreground color is combined with the
colors in underlying primitives. The available mixing modes depend on the
device that is associated with the presentation space, but all devices
support the FM_LEAVEALONE, FM_XOR, and FM_OVERPAINT mixing modes. If the
mixing mode specified by flMixMode is not supported, the function uses
FM_OVERPAINT instead. The DevQueryCaps function can be used to determine
which mixing modes are supported.
If the attribute mode is AM_PRESERVE, the function saves the previous
foreground-mix mode on the attribute stack when it sets the new mode. The
previous foreground-mix mode can be retrieved using the GpiPop function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
flMixMode Specifies the color-mixing mode. It can be one of the following
values:
Value Meaning
─────────────────────────────────────────────────────────────────
FM_AND The individual pel colors are combined using the
AND operator.
FM_DEFAULT Default. This is the same as FM_OVERPAINT.
FM_INVERT All existing pel colors are inverted. The
foreground color is ignored.
FM_LEAVEALONE The foreground color is ignored. The existing
color remains unchanged.
FM_MASKSRCNOT The individual pel colors are combined using the
AND operator after inverting the existing pel
colors.
FM_MERGENOTSRC The individual pel colors are combined using the
OR operator after inverting the foreground
color.
FM_MERGESRCNOT The individual pel colors are combined using the
OR operator after inverting the existing pel
colors.
FM_NOTCOPYSRC The inverse of the foreground color replaces the
existing color.
FM_NOTMASKSRC The individual pel colors are inverted after
being combined using the AND operator.
FM_NOTMERGESRC The individual pel colors are inverted after
being combined using the OR operator.
FM_NOTXORSRC The individual pel colors are inverted after
being combined using the XOR operator.
FM_ONE All pels are set to one.
FM_OR The individual pel colors are combined using the
OR operator.
FM_OVERPAINT The foreground color replaces the existing
color.
FM_SUBTRACT The individual pel colors are combined using the
AND operator after inverting the foreground
color.
FM_XOR The individual pel colors are combined using the
XOR operator.
FM_ZERO All pels are set to zero.
Return Value
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
PMERR_INV_HPS
PMERR_INV_MIX_ATTR
PMERR_PS_BUSY
See Also
DevQueryCaps, GpiQueryMix, GpiSetBackMix
♦