次の方法で共有


2.2.2.4 EmfPlusBlendColors Object

The EmfPlusBlendColors object specifies positions and colors for the blend pattern of a gradient brush.


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

PositionCount

BlendPositions (variable)

...

BlendColors (variable)

...

PositionCount (4 bytes): An unsigned integer that specifies the number of positions in the BlendPositions field and colors in the BlendColors field.

BlendPositions (variable): An array of PositionCount 32-bit floating-point values that specify proportions of distance along the gradient line.

Each element MUST be a number between 0.0 and 1.0 inclusive. For a linear gradient brush, 0.0 represents the starting point and 1.0 represents the ending point. For a path gradient brush, 0.0 represents the midpoint and 1.0 represents an endpoint.

BlendColors (variable): An array of PositionCount EmfPlusARGB objects (section 2.2.2.5) that specify colors at the positions defined in the BlendPositions field.

Gradient brushes are specified by EmfPlusLinearGradientBrushData objects (section 2.2.2.24) and EmfPlusPathGradientBrushData objects (section 2.2.2.29). Blend patterns are used to smoothly shade the interiors of shapes filled by gradient brushes. and can be defined by arrays of positions and colors or positions and factors. Positions and factors are specified by EmfPlusBlendFactors objects (section 2.2.2.5).

An EmfPlusBlendColors object MUST be present in the OptionalData field of an EmfPlusLinearGradientBrushData object, if the BrushDataPresetColors flag is set in its BrushDataFlags field.

An EmfPlusBlendColors object MUST be present in the OptionalData field of an EmfPlusPathGradientBrushData object, if the BrushDataPresetColors flag is set in its BrushDataFlags field.

See section 2.2.2 for the specification of additional structure objects.