The IDXGradient interface produces gradient images that fade gradually from one color to another. It is used like a transform that has no input surfaces and produces one DXSurface object as output. The output surface is determined by setting a start color, end color, and choosing either a horizontal or vertical gradient.
This interface inherits from the IDXTScaleOutput interface, which enables you to set the output size of the gradient surface.
IDXGradient Methods
GetOutputSize Retrieves the size of the output surface. SetGradient Sets the parameters used to produce the gradient surface.
Retrieves the size of the output surface.
Syntax
HRESULT GetOutputSize( SIZE *pOutSize );
Parameters
- pOutSize
- [out] Pointer to the SIZE structure that stores the height and width of the output surface, in pixels.
Return Value
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
You can set this size with the IDXTScaleOutput interface.
Sets the parameters used to produce the gradient surface.
Syntax
HRESULT SetGradient( DXSAMPLE StartColor, DXSAMPLE EndColor, BOOL bHorizontal );
Parameters
- StartColor
- [in] Start color in DXSAMPLE format.
- EndColor
- [out] End color in DXSAMPLE format.
- bHorizontal
- [out] Boolean value that indicates the gradient direction. If TRUE, the gradient is horizontal; if FALSE, the gradient is vertical.
Return Value
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
The start color is on the left of the image for horizontal gradients and on the top of the image for vertical gradients.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.