EMRGRADIENTFILL structure (wingdi.h)

The EMRGRADIENTFILL structure contains members for the GradientFill enhanced metafile record.

Syntax

typedef struct tagEMRGRADIENTFILL {
  EMR       emr;
  RECTL     rclBounds;
  DWORD     nVer;
  DWORD     nTri;
  ULONG     ulMode;
  TRIVERTEX Ver[1];
} EMRGRADIENTFILL, *PEMRGRADIENTFILL;

Members

emr

The base structure for all record types.

rclBounds

The bounding rectangle, in device units.

nVer

The number of vertices.

nTri

The number of rectangles or triangles to be passed to GradientFill.

ulMode

The gradient fill mode. This member can be one of the following values.

Value Meaning
GRADIENT_FILL_RECT_H
In this mode, two endpoints describe a rectangle. The rectangle is defined to have a constant color (specified by the TRIVERTEX structure) for the left and right edges. GDI interpolates the color from the left to right edge and fills the interior.
GRADIENT_FILL_RECT_V
In this mode, two endpoints describe a rectangle. The rectangle is defined to have a constant color (specified by the TRIVERTEX structure) for the top and bottom edges. GDI interpolates the color from the top to bottom edge and fills the interior.
GRADIENT_FILL_TRIANGLE
In this mode, an array of TRIVERTEX structures is passed to GDI along with a list of array indexes that describe separate triangles. GDI performs linear interpolation between triangle vertices and fills the interior. Drawing is done directly in 24- and 32-bpp modes. Dithering is performed in 16-, 8-, 4-, and 1-bpp mode.

Ver[1]

An array of TRIVERTEX structures that each define a vertex.

Remarks

This is a variable-length structure. The Ver member designates the beginning of the variable-length area. First comes an array of nVer TRIVERTEX structures to pass the vertices. Next comes an array of either nTri GRADIENT_TRIANGLE structures or nTri GRADIENT_RECT structures, depending on the value of ulMode (triangles or rectangles).

This structure is to be used during metafile playback.

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

BITMAPINFO

EMR

GRADIENT_RECT

GRADIENT_TRIANGLE

GradientFill

Metafile Structures

Metafiles

Metafiles Overview