Skip to main content

ImmutableLinearGradientBrush Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

A brush that draws with a linear gradient.

public class ImmutableLinearGradientBrush

Inheritance: object -> ImmutableGradientBrush -> ImmutableLinearGradientBrush

Constructors

ImmutableLinearGradientBrush overloads

ImmutableLinearGradientBrush Constructor

Initializes a new instance of the Avalonia.Media.Immutable.ImmutableLinearGradientBrush class.

public ImmutableLinearGradientBrush(Avalonia.Media.LinearGradientBrush source)
Parameters

source Avalonia.Media.LinearGradientBrush

The brush from which this brush's properties should be copied.

ImmutableLinearGradientBrush Constructor

public ImmutableLinearGradientBrush(System.Collections.Generic.IReadOnlyList<Avalonia.Media.Immutable.ImmutableGradientStop> gradientStops, double opacity, Avalonia.Media.Immutable.ImmutableTransform transform, Nullable<Avalonia.RelativePoint> transformOrigin, Avalonia.Media.GradientSpreadMethod spreadMethod, Nullable<Avalonia.RelativePoint> startPoint, Nullable<Avalonia.RelativePoint> endPoint)
Parameters

gradientStops System.Collections.Generic.IReadOnlyList<Avalonia.Media.Immutable.ImmutableGradientStop>

opacity double

transform Avalonia.Media.Immutable.ImmutableTransform

transformOrigin Nullable<Avalonia.RelativePoint>

spreadMethod Avalonia.Media.GradientSpreadMethod

startPoint Nullable<Avalonia.RelativePoint>

endPoint Nullable<Avalonia.RelativePoint>

Properties

NameDescription
EndPointGets or sets the end point for the gradient.
StartPointGets or sets the start point for the gradient.
GradientStopsGets the brush's gradient stops. Inherited from ImmutableGradientBrush.
OpacityGets the opacity of the brush. Inherited from ImmutableGradientBrush.
SpreadMethodGets the brush's spread method that defines how to draw a gradient that doesn't fill the bounds of the destination control. Inherited from ImmutableGradientBrush.
TransformGets the transform of the brush. Inherited from ImmutableGradientBrush.
TransformOriginGets the transform origin of the brush Inherited from ImmutableGradientBrush.

EndPoint Property

Gets or sets the end point for the gradient.

public Avalonia.RelativePoint EndPoint { get; set; }

StartPoint Property

Gets or sets the start point for the gradient.

public Avalonia.RelativePoint StartPoint { get; set; }