Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GRADIENT_RECT structure

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;

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.

Illustration of a rectangle that shades from dark on the left side to light on the right sideIllustration of a rectangle that shades from dark on the top to light on the bottom

Examples

For an example, see Drawing a Shaded Rectangle.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

See also

Bitmaps Overview
Bitmap Structures
GradientFill
GRADIENT_TRIANGLE
TRIVERTEX

 

 

Show:
© 2016 Microsoft