Class SkiaGradient
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
BlendModeProperty
public static readonly BindableProperty BlendModeProperty
Field Value
ColorPositionsProperty
public static readonly BindableProperty ColorPositionsProperty
Field Value
ColorsProperty
public static readonly BindableProperty ColorsProperty
Field Value
EndXRatioProperty
public static readonly BindableProperty EndXRatioProperty
Field Value
EndYRatioProperty
public static readonly BindableProperty EndYRatioProperty
Field Value
LightProperty
public static readonly BindableProperty LightProperty
Field Value
OpacityProperty
public static readonly BindableProperty OpacityProperty
Field Value
StartXRatioProperty
public static readonly BindableProperty StartXRatioProperty
Field Value
StartYRatioProperty
public static readonly BindableProperty StartYRatioProperty
Field Value
TileModeProperty
public static readonly BindableProperty TileModeProperty
Field Value
TypeProperty
public static readonly BindableProperty TypeProperty
Field Value
Properties
Angle
public double? Angle { get; set; }
Property Value
BlendMode
public SKBlendMode BlendMode { get; set; }
Property Value
ColorPositions
public IList<double> ColorPositions { get; set; }
Property Value
Colors
public IList<Color> Colors { get; set; }
Property Value
EndXRatio
public float EndXRatio { get; set; }
Property Value
EndYRatio
public float EndYRatio { get; set; }
Property Value
Light
public double Light { get; set; }
Property Value
Opacity
public float Opacity { get; set; }
Property Value
Parent
public ISkiaControl Parent { get; set; }
Property Value
StartXRatio
public float StartXRatio { get; set; }
Property Value
StartYRatio
public float StartYRatio { get; set; }
Property Value
TileMode
public SKShaderTileMode TileMode { get; set; }
Property Value
Type
public GradientType Type { get; set; }
Property Value
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
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
otherSkiaGradientAn 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 otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin 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
objobjectAn 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 objin the sort order.Zero This instance occurs in the same position in the sort order as obj.Greater than zero This instance follows objin the sort order.
Exceptions
- ArgumentException
objis 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
otherSkiaGradientAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
FromBrush(GradientBrush)
public static SkiaGradient FromBrush(GradientBrush gradientBrush)
Parameters
gradientBrushGradientBrush
Returns
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
directiondouble
Returns
Operators
operator ==(SkiaGradient, SkiaGradient)
public static bool operator ==(SkiaGradient left, SkiaGradient right)
Parameters
leftSkiaGradientrightSkiaGradient
Returns
operator !=(SkiaGradient, SkiaGradient)
public static bool operator !=(SkiaGradient left, SkiaGradient right)
Parameters
leftSkiaGradientrightSkiaGradient