Table of Contents

Method CreateLinearGradientBrush

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

CreateLinearGradientBrush(in LinearGradientBrushProperties, in BrushProperties?, IGradientStopCollection)

Creates an ILinearGradientBrush object for painting areas with a linear gradient.

ILinearGradientBrush CreateLinearGradientBrush(in LinearGradientBrushProperties linearGradientBrushProperties, in BrushProperties? brushProperties, IGradientStopCollection gradientStopCollection)

Parameters

linearGradientBrushProperties LinearGradientBrushProperties

The start and end points of the gradient.

brushProperties BrushProperties?

The transform and base opacity of the new brush. Pass null to use an opacity of 1.0f and an identity transform matrix.

gradientStopCollection IGradientStopCollection

A IGradientStopCollection object that describes the colors in the brush's gradient and their locations along the gradient.

Returns

ILinearGradientBrush

The new linear gradient brush object.