Table of Contents

Class LinearGradientBrush

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll
[Guid("2cd906ab-12e2-11dc-9fed-001143a055f9")]
public class LinearGradientBrush : Brush
Inheritance
LinearGradientBrush
Inherited Members

Constructors

LinearGradientBrush(RenderTarget, LinearGradientBrushProperties, GradientStopCollection)

Creates an LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

public LinearGradientBrush(RenderTarget renderTarget, LinearGradientBrushProperties linearGradientBrushProperties, GradientStopCollection gradientStopCollection)

Parameters

renderTarget RenderTarget

an instance of RenderTarget

linearGradientBrushProperties LinearGradientBrushProperties

The start and end points of the gradient.

gradientStopCollection GradientStopCollection

A collection of GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient line.

LinearGradientBrush(RenderTarget, LinearGradientBrushProperties, BrushProperties?, GradientStopCollection)

Creates an LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

public LinearGradientBrush(RenderTarget renderTarget, LinearGradientBrushProperties linearGradientBrushProperties, BrushProperties? brushProperties, GradientStopCollection gradientStopCollection)

Parameters

renderTarget RenderTarget

an instance of RenderTarget

linearGradientBrushProperties LinearGradientBrushProperties

The start and end points of the gradient.

brushProperties BrushProperties?

The transform and base opacity of the new brush, or NULL. If this value is NULL, the brush defaults to a base opacity of 1.0f and the identity matrix as its transformation.

gradientStopCollection GradientStopCollection

A collection of GradientStop structures that describe the colors in the brush's gradient and their locations along the gradient line.

LinearGradientBrush(nint)

public LinearGradientBrush(nint nativePtr)

Parameters

nativePtr nint

Properties

EndPoint

Retrieves or sets the ending coordinates of the linear gradient.

public RawVector2 EndPoint { get; set; }

Property Value

RawVector2

Remarks

The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.

GradientStopCollection

Retrieves the GradientStopCollection associated with this linear gradient brush.

public GradientStopCollection GradientStopCollection { get; }

Property Value

GradientStopCollection

Remarks

GradientStopCollection contains an array of GradientStop structures and information, such as the extend mode and the color interpolation mode.

StartPoint

Retrieves or sets the starting coordinates of the linear gradient.

public RawVector2 StartPoint { get; set; }

Property Value

RawVector2

Remarks

The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.

Operators

explicit operator LinearGradientBrush(nint)

public static explicit operator LinearGradientBrush(nint nativePtr)

Parameters

nativePtr nint

Returns

LinearGradientBrush