GRADIENT_TRIANGLE structure

The GRADIENT_TRIANGLE structure specifies the index of three vertices in the pVertex array in the GradientFill function. These three vertices form one triangle.

Syntax

typedef struct _GRADIENT_TRIANGLE {
  ULONG Vertex1;
  ULONG Vertex2;
  ULONG Vertex3;
} GRADIENT_TRIANGLE, *PGRADIENT_TRIANGLE, *LPGRADIENT_TRIANGLE;

Members

Vertex1

The first point of the triangle where sides intersect.

Vertex2

The second point of the triangle where sides intersect.

Vertex3

The third point of the triangle where sides intersect.

Remarks

The GRADIENT_TRIANGLE structure specifies the values in the pVertex array that are used when the dwMode parameter of the GradientFill function is GRADIENT_FILL_TRIANGLE. For related GradientFill structures, see GRADIENT_RECT and TRIVERTEX.

The following image shows an example of a triangle with a gradient fill.

Illustration of a triangle that fills from orange at the top point to magenta on the bottom line

Examples

For an example, see Drawing a Shaded Triangle.

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

Bitmap Structures

Bitmaps Overview

GRADIENT_RECT

GradientFill

TRIVERTEX