Table of Contents

Class ImmutableRadialGradientBrush

Namespace
Avalonia.Media.Immutable
Assembly
Avalonia.Base.dll

A brush that draws with a radial gradient.

public class ImmutableRadialGradientBrush : ImmutableGradientBrush, IImmutableBrush, IRadialGradientBrush, IGradientBrush, IBrush
Inheritance
ImmutableRadialGradientBrush
Implements
Inherited Members
Extension Methods

Constructors

ImmutableRadialGradientBrush(RadialGradientBrush)

Initializes a new instance of the ImmutableRadialGradientBrush class.

public ImmutableRadialGradientBrush(RadialGradientBrush source)

Parameters

source RadialGradientBrush

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

ImmutableRadialGradientBrush(IReadOnlyList<ImmutableGradientStop>, double, ImmutableTransform?, RelativePoint?, GradientSpreadMethod, RelativePoint?, RelativePoint?, double)

Initializes a new instance of the ImmutableRadialGradientBrush class.

public ImmutableRadialGradientBrush(IReadOnlyList<ImmutableGradientStop> gradientStops, double opacity = 1, ImmutableTransform? transform = null, RelativePoint? transformOrigin = null, GradientSpreadMethod spreadMethod = GradientSpreadMethod.Pad, RelativePoint? center = null, RelativePoint? gradientOrigin = null, double radius = 0.5)

Parameters

gradientStops IReadOnlyList<ImmutableGradientStop>

The gradient stops.

opacity double

The opacity of the brush.

transform ImmutableTransform

The transform of the brush.

transformOrigin RelativePoint?

The transform origin of the brush

spreadMethod GradientSpreadMethod

The spread method.

center RelativePoint?

The start point for the gradient.

gradientOrigin RelativePoint?

The location of the two-dimensional focal point that defines the beginning of the gradient.

radius double

The horizontal and vertical radius of the outermost circle of the radial gradient.

ImmutableRadialGradientBrush(IReadOnlyList<ImmutableGradientStop>, double, ImmutableTransform?, RelativePoint?, GradientSpreadMethod, RelativePoint?, RelativePoint?, RelativeScalar?, RelativeScalar?)

public ImmutableRadialGradientBrush(IReadOnlyList<ImmutableGradientStop> gradientStops, double opacity = 1, ImmutableTransform? transform = null, RelativePoint? transformOrigin = null, GradientSpreadMethod spreadMethod = GradientSpreadMethod.Pad, RelativePoint? center = null, RelativePoint? gradientOrigin = null, RelativeScalar? radiusX = null, RelativeScalar? radiusY = null)

Parameters

gradientStops IReadOnlyList<ImmutableGradientStop>
opacity double
transform ImmutableTransform
transformOrigin RelativePoint?
spreadMethod GradientSpreadMethod
center RelativePoint?
gradientOrigin RelativePoint?
radiusX RelativeScalar?
radiusY RelativeScalar?

Properties

Center

Gets the start point for the gradient.

public RelativePoint Center { get; }

Property Value

RelativePoint

GradientOrigin

Gets the location of the two-dimensional focal point that defines the beginning of the gradient.

public RelativePoint GradientOrigin { get; }

Property Value

RelativePoint

Radius

[Obsolete("Use RadiusX/RadiusY")]
public double Radius { get; }

Property Value

double

RadiusX

Gets the horizontal radius of the outermost circle of the radial gradient.

public RelativeScalar RadiusX { get; }

Property Value

RelativeScalar

RadiusY

Gets the vertical radius of the outermost circle of the radial gradient.

public RelativeScalar RadiusY { get; }

Property Value

RelativeScalar