SetColorKey method

Sets the surface's color_key value.

Syntax

HRESULT retVal = object.SetColorKey(ColorKey);

Parameters

  • ColorKey
    Type: [DXSAMPLE](aa743764(v=vs.85).md)

    Color in DXSAMPLE format that indicates the color to treat as transparent.

Remarks

The specified color must have an alpha value of 255 (0xFF). The other color components must specify the color as a 24-bit RGB value. The surface implementation can convert this to a different color representation internally, if necessary.

See also

IDXSurface::GetColorKey