次の方法で共有


2.2.2.24 EmfPlusLinearGradientBrushData Object

The EmfPlusLinearGradientBrushData object specifies a linear 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

RectF

...

...

...

StartColor

EndColor

Reserved1

Reserved2

OptionalData (variable)

...

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

Name

Value

BrushDataTransform

0x00000002

BrushDataPresetColors

0x00000004

BrushDataBlendFactorsH

0x00000008

BrushDataBlendFactorsV

0x00000010

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.

RectF (16 bytes): An EmfPlusRectF object (section 2.2.2.39) that specifies the starting and ending points of the gradient line. The upper-left corner of the rectangle is the starting point. The lower-right corner is the ending point.

StartColor (4 bytes): An EmfPlusARGB object (section 2.2.2.1) that specifies the color at the starting boundary point of the linear gradient brush.

EndColor (4 bytes): An EmfPlusARGB object that specifies the color at the ending boundary point of the linear gradient brush.

Reserved1 (4 bytes): This field is reserved and SHOULD<13> be ignored.

Reserved2 (4 bytes): This field is reserved and SHOULD<14> be ignored.

OptionalData (variable): An optional EmfPlusLinearGradientBrushOptionalData object (section 2.2.2.25) that specifies additional data for the linear 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 linear gradient brush paints a color gradient in which the color changes gradually along a gradient line from a starting boundary point to an ending boundary point, which are specified by the diagonal of a rectangle in the RectF 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.