TRIVERTEX structure (wingdi.h)

The TRIVERTEX structure contains color information and position information.

Syntax

typedef struct _TRIVERTEX {
  LONG    x;
  LONG    y;
  COLOR16 Red;
  COLOR16 Green;
  COLOR16 Blue;
  COLOR16 Alpha;
} TRIVERTEX, *PTRIVERTEX, *LPTRIVERTEX;

Members

x

The x-coordinate, in logical units, of the upper-left corner of the rectangle.

y

The y-coordinate, in logical units, of the upper-left corner of the rectangle.

Red

The color information at the point of x, y.

Green

The color information at the point of x, y.

Blue

The color information at the point of x, y.

Alpha

The color information at the point of x, y.

Remarks

In the TRIVERTEX structure, x and y indicate position in the same manner as in the POINTL structure contained in the wtypes.h header file. Red, Green, Blue, and Alpha members indicate color information at the point x, y. The color information of each channel is specified as a value from 0x0000 to 0xff00. This allows higher color resolution for an object that has been split into small triangles for display. The TRIVERTEX structure contains information needed by the pVertex parameter of GradientFill.

Examples

For an example of the use of this structure, see Drawing a Shaded Triangle or 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)

See also

Bitmap Structures

Bitmaps Overview

GradientFill

POINTL