Table of Contents

Class SkiaGradient

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public class SkiaGradient : BindableObject, INotifyPropertyChanged, ICloneable, IComparable, IComparable<SkiaGradient>, IEquatable<SkiaGradient>
Inheritance
SkiaGradient
Implements
Inherited Members
Extension Methods

Fields

AngleProperty

public static readonly BindableProperty AngleProperty

Field Value

BindableProperty

BlendModeProperty

public static readonly BindableProperty BlendModeProperty

Field Value

BindableProperty

ColorPositionsProperty

public static readonly BindableProperty ColorPositionsProperty

Field Value

BindableProperty

ColorsProperty

public static readonly BindableProperty ColorsProperty

Field Value

BindableProperty

EndXRatioProperty

public static readonly BindableProperty EndXRatioProperty

Field Value

BindableProperty

EndYRatioProperty

public static readonly BindableProperty EndYRatioProperty

Field Value

BindableProperty

LightProperty

public static readonly BindableProperty LightProperty

Field Value

BindableProperty

OpacityProperty

public static readonly BindableProperty OpacityProperty

Field Value

BindableProperty

StartXRatioProperty

public static readonly BindableProperty StartXRatioProperty

Field Value

BindableProperty

StartYRatioProperty

public static readonly BindableProperty StartYRatioProperty

Field Value

BindableProperty

TileModeProperty

public static readonly BindableProperty TileModeProperty

Field Value

BindableProperty

TypeProperty

public static readonly BindableProperty TypeProperty

Field Value

BindableProperty

Properties

Angle

public double? Angle { get; set; }

Property Value

double?

BlendMode

public SKBlendMode BlendMode { get; set; }

Property Value

SKBlendMode

ColorPositions

public IList<double> ColorPositions { get; set; }

Property Value

IList<double>

Colors

public IList<Color> Colors { get; set; }

Property Value

IList<Color>

EndXRatio

public float EndXRatio { get; set; }

Property Value

float

EndYRatio

public float EndYRatio { get; set; }

Property Value

float

Light

public double Light { get; set; }

Property Value

double

Opacity

public float Opacity { get; set; }

Property Value

float

Parent

public ISkiaControl Parent { get; set; }

Property Value

ISkiaControl

StartXRatio

public float StartXRatio { get; set; }

Property Value

float

StartYRatio

public float StartYRatio { get; set; }

Property Value

float

TileMode

public SKShaderTileMode TileMode { get; set; }

Property Value

SKShaderTileMode

Type

public GradientType Type { get; set; }

Property Value

GradientType

Version

Incremented whenever any gradient property changes. Consumers can cache shaders keyed on this version to avoid rebuilding native objects every frame.

public int Version { get; }

Property Value

int

Methods

Clone()

Creates a new object that is a copy of the current instance.

public object Clone()

Returns

object

A new object that is a copy of this instance.

CompareTo(SkiaGradient)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(SkiaGradient other)

Parameters

other SkiaGradient

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

CompareTo(object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

Equals(SkiaGradient)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SkiaGradient other)

Parameters

other SkiaGradient

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

FromBrush(GradientBrush)

public static SkiaGradient FromBrush(GradientBrush gradientBrush)

Parameters

gradientBrush GradientBrush

Returns

SkiaGradient

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

LinearGradientAngleToPoints(double)

public static (double X1, double Y1, double X2, double Y2) LinearGradientAngleToPoints(double direction)

Parameters

direction double

Returns

(double X1, double Y1, double X2, double Y2)

Operators

operator ==(SkiaGradient, SkiaGradient)

public static bool operator ==(SkiaGradient left, SkiaGradient right)

Parameters

left SkiaGradient
right SkiaGradient

Returns

bool

operator !=(SkiaGradient, SkiaGradient)

public static bool operator !=(SkiaGradient left, SkiaGradient right)

Parameters

left SkiaGradient
right SkiaGradient

Returns

bool