MdispOverlayKey()函数

Synopsis

Enable overlay keying.

Format

void MdispOverlayKey(DisplayId, KeyMode, KeyCond, KeyMask, KeyColor)

MIL_ID DisplayId; Display identifier
long KeyMode; Mode for keying
long KeyCond; Keying condition
long KeyMask; Keying mask to apply before comparison
long KeyColor; Keying color with which to compare

Description

This function enables overlay keying of the specified target display with an external display source. Note, an error occurs if keying is not supported on the target system display.

The DisplayId parameter specifies the identifier of the display.

The KeyMode parameter specifies the keying mode. It can be set to one of the following:

M_KEY_OFF Display the external display source only (no keying).
M_KEY_ON_COLOR Enable keying. Overlay external display source on the specified target display, keying on the specified condition and color.
M_KEY_ALWAYS Display the specified target display only (always use keying). The external display source is made completely transparent.

The KeyCond parameter specifies the keying condition when keying is enabled. If keying is enabled (M_KEY_ON_COLOR), set this parameter to one of the following:

M_EQUAL Display the specified target display when external display source pixel equals KeyColor.
M_NOT_EQUAL Display the specified target display when external display source pixel does not equal KeyColor.

Otherwise, set the KeyCond to M_NULL.

The KeyMask parameter specifies the mask to apply to the external source pixels before performing the comparison when keying is enabled (M_KEY_ON_COLOR).

When keying is not enabled, set KeyMask to M_NULL.

The KeyColor parameter specifies the keying color when keying is enabled (M_KEY_ON_COLOR). When keying is not enabled, set this parameter to M_NULL.

The following example will display the specified target display when the external display source color is equal to 10.

MdispOverlayKey(DisplayId, M_KEY_ON_COLOR, M_EQUAL, 0xffL, 10L)

Hardware-specific

Note, on many Matrox boards there is a VGA keying capability. This function can be used to control VGA keying, in which case you can assume that the external display source is the VGA display output.

《MdispOverlayKey()函数》上有1条评论

评论已关闭。