2.2.2.25 EmfPlusLinearGradientBrushOptionalData Object

The EmfPlusLinearGradientBrushOptionalData object specifies optional data for a linear gradient brush.

Note: Each field of this object is optional and might not be present in the OptionalData field of an EmfPlusLinearGradientBrushData object (section 2.2.2.24), depending on the BrushData flags (section 2.1.2.1) set in its BrushDataFlags field. Although it is not practical to represent every possible combination of fields present or absent, this section specifies their relative order in the object. The implementer is responsible for determining which fields are actually present in a given metafile record, and for unmarshaling the data for individual fields separately and appropriately.


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

TransformMatrix (24 bytes, optional)

...

...

...

BlendPattern (variable)

...

TransformMatrix (24 bytes): An optional EmfPlusTransformMatrix object (section 2.2.2.47) that specifies a world space to device space transform for the linear gradient brush. This field MUST be present if the BrushDataTransform flag is set in the BrushDataFlags field of the EmfPlusLinearGradientBrushData object.

BlendPattern (variable): An optional blend pattern for the linear gradient brush. If this field is present, it MUST contain either an EmfPlusBlendColors object (section 2.2.2.4), or one or two EmfPlusBlendFactors objects (section 2.2.2.5), but it MUST NOT contain both. The table below shows the valid combinations of flags in the BrushDataFlags field of the EmfPlusLinearGradientBrushData object and the corresponding blend patterns:

PresetColors

BlendFactorsH

BlendFactorsV

Blend Pattern

Clear

Clear

Clear

This field MUST NOT be present in the EmfPlusLinearGradientBrushOptionalData object.

Set

Clear

Clear

An EmfPlusBlendColors object MUST be present.

Clear

Set

Clear

An EmfPlusBlendFactors object along the horizontal gradient line MUST be present.

Clear

Clear

Set

An EmfPlusBlendFactors object along the vertical gradient line MUST be present.<15>

Clear

Set

Set

An EmfPlusBlendFactors object along the vertical gradient line and an EmfPlusBlendFactors object along the horizontal gradient line MUST be present.<16>

Graphics brushes are specified by EmfPlusBrush objects (section 2.2.1.1).

See section 2.2.2 for the specification of additional structure objects.