GRADIENT_RECT structure (wingdi.h)
The GRADIENT_RECT structure specifies the index of two vertices in the pVertex array in the GradientFill function. These two vertices form the upper-left and lower-right boundaries of a rectangle.
Syntax
typedef struct _GRADIENT_RECT {
ULONG UpperLeft;
ULONG LowerRight;
} GRADIENT_RECT, *PGRADIENT_RECT, *LPGRADIENT_RECT;
Members
UpperLeft
The upper-left corner of a rectangle.
LowerRight
The lower-right corner of a rectangle.
Remarks
The GRADIENT_RECT structure specifies the values of the pVertex array that are used when the dwMode parameter of the GradientFill function is GRADIENT_FILL_RECT_H or GRADIENT_FILL_RECT_V. For related GradientFill structures, see GRADIENT_TRIANGLE and TRIVERTEX.
The following images shows examples of a rectangle with a gradient fill - one in horizontal mode, the other in vertical mode.


Examples
For an example, see Drawing a Shaded Rectangle.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | wingdi.h (include Windows.h) |