SetGradient method

Sets the parameters used to produce the gradient surface.

Syntax

HRESULT retVal = object.SetGradient(StartColor, EndColor, bHorizontal);

Parameters

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

    Start color in DXSAMPLE format.

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

    End color in DXSAMPLE format.

  • bHorizontal
    Type: BOOL

    BOOL value that indicates the gradient direction. If TRUE, the gradient is horizontal; if FALSE, the gradient is vertical.

Remarks

The start color is on the left side of the image for horizontal gradients and on the top of the image for vertical gradients.