次の方法で共有


2.3.5.12 EMR_GRADIENTFILL Record

The EMR_GRADIENTFILL record specifies filling rectangles or triangles with gradients of color.<67>


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Type

Size

Bounds

...

...

...

nVer

nTri

ulMode

VertexData (variable)

...

Type (4 bytes): An unsigned integer that identifies this record type as EMR_GRADIENTFILL. This value is 0x00000076.

Size (4 bytes): An unsigned integer that specifies the size of this record in bytes.

Bounds (16 bytes): A RectL object ([MS-WMF] section 2.2.2.19), which specifies the inclusive-inclusive bounding rectangle in logical units.

nVer (4 bytes): An unsigned integer that specifies the number of vertexes.

nTri (4 bytes): An unsigned integer that specifies the number of rectangles or triangles to fill.

ulMode (4 bytes): An unsigned integer that specifies the gradient fill mode. This value is in the GradientFill enumeration (section 2.1.15).

VertexData (variable): Objects that specify the vertexes of either rectangles or triangles and the colors that correspond to them.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

VertexObjects (variable)

...

VertexIndexes (variable)

...

VertexPadding (variable, optional)

...

VertexObjects (variable): An array of nVer TriVertex objects (section 2.2.26). Each object specifies the position and color of a vertex of either a rectangle or a triangle, depending on the value of the ulMode field.

VertexIndexes (variable): An array of nTri GradientRectangle objects (section 2.2.7) or GradientTriangle objects (section 2.2.8), depending on the value of the ulMode field. Each object specifies indexes into the array of TriVertex objects in the VertexObjects field.

VertexPadding (variable, optional): An array of nTri times four bytes that MUST be present if the value of the ulMode field indicates GradientRectangle objects (section 2.2.7). If the value of the ulMode field indicates GradientTriangle objects (section 2.2.8), no VertexPadding is present. This field MUST be ignored.

An EMR_GRADIENTFILL record that specifies that the three vertexes of a triangle SHOULD fill the figure with smooth gradients of colors.<68>

An EMR_GRADIENTFILL record that specifies that the upper-left and lower-right vertexes of a rectangle SHOULD fill the figure with smooth gradients of color. There are two gradient fill modes in the GradientFill enumeration that can be used when drawing a rectangle. In GRADIENT_FILL_RECT_H mode, the rectangle is filled from left to right. In GRADIENT_FILL_RECT_V mode, the rectangle is filled from top to bottom.

An EMR_GRADIENTFILL record MUST ignore the Alpha fields in the TriVertex objects. An EMR_ALPHABLEND record (section 2.3.1.1) that immediately follows the EMR_GRADIENTFILL record can be used to apply an alpha transparency gradient to the filled area.

See section 2.3.5 for more drawing record types.