2.2.2.29 EmfPlusPathGradientBrushData Object

The EmfPlusPathGradientBrushData object specifies a path gradient for a graphics 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

BrushDataFlags

WrapMode

CenterColor

CenterPointF

...

SurroundingColorCount

SurroundingColor (variable)

...

BoundaryData (variable)

...

OptionalData (variable)

...

BrushDataFlags (4 bytes): An unsigned integer that specifies the data in the OptionalData field. This value is composed of BrushData flags (section 2.1.2.1). The following flags are relevant to a path gradient brush:

Name

Value

BrushDataPath

0x00000001

BrushDataTransform

0x00000002

BrushDataPresetColors

0x00000004

BrushDataBlendFactorsH

0x00000008

BrushDataFocusScales

0x00000040

BrushDataIsGammaCorrected

0x00000080

WrapMode (4 bytes): A signed integer from the WrapMode enumeration (section 2.1.1.33) that specifies whether to paint the area outside the boundary of the brush. When painting outside the boundary, the wrap mode specifies how the color gradient is repeated.

CenterColor (4 bytes): An EmfPlusARGB object (section 2.2.2.1) that specifies the center color of the path gradient brush, which is the color that appears at the center point of the brush. The color of the brush changes gradually from the boundary color to the center color as it moves from the boundary to the center point.

CenterPointF (8 bytes): An EmfPlusPointF object (section 2.2.2.36) that specifies the center point of the path gradient brush, which can be any location inside or outside the boundary. The color of the brush changes gradually from the boundary color to the center color as it moves from the boundary to the center point.

SurroundingColorCount (4 bytes): An unsigned integer that specifies the number of colors specified in the SurroundingColor field. The surrounding colors are colors specified for discrete points on the boundary of the brush.

SurroundingColor (variable): An array of SurroundingColorCount EmfPlusARGB objects that specify the colors for discrete points on the boundary of the brush.

BoundaryData (variable): The boundary of the path gradient brush, which is specified by either a path or a closed cardinal spline. If the BrushDataPath flag is set in the BrushDataFlags field, this field MUST contain an EmfPlusBoundaryPathData object (section 2.2.2.6); otherwise, this field MUST contain an EmfPlusBoundaryPointData object (section 2.2.2.7).

OptionalData (variable): An optional EmfPlusPathGradientBrushOptionalData object (section 2.2.2.30) that specifies additional data for the path gradient brush. The specific contents of this field are determined by the value of the BrushDataFlags field.

Graphics brushes are specified by EmfPlusBrush objects (section 2.2.1.1). A path gradient brush paints a color gradient in which the color changes gradually along a gradient line from the center point outward to the boundary, which are specified by either a closed cardinal spline or a path in the BoundaryData field.

Gamma correction controls the overall brightness and intensity of an image. Uncorrected images can look either bleached out or too dark. Varying the amount of gamma correction changes not only the brightness but also the ratios of red to green to blue. The need for gamma correction arises because an output device might not render colors in the same intensity as the input image.

See section 2.2.2 for the specification of additional structure objects.