Struct GradientColor
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
表示一个渐变色。
public readonly struct GradientColor : IEquatable<GradientColor>
- Implements
- Inherited Members
Constructors
GradientColor(Color, Color)
初始化一个 GradientColor 结构的新实例。
public GradientColor(Color left, Color right)
Parameters
Properties
Left
获取此渐变色的左侧颜色。
public Color Left { get; }
Property Value
Right
获取此渐变色的右侧颜色。
public Color Right { get; }
Property Value
Methods
Deconstruct(out Color, out Color)
将此渐变色解构为表示左右两个颜色的元组。
public void Deconstruct(out Color left, out Color right)
Parameters
Equals(GradientColor)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(GradientColor other)
Parameters
other
GradientColorAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
implicit operator (Color Left, Color Right)(GradientColor)
将此渐变色转换为表示左右两个颜色的元组。
public static implicit operator (Color Left, Color Right)(GradientColor gradient)
Parameters
gradient
GradientColor要转换的渐变色。
Returns
implicit operator GradientColor((Color Left, Color Right))
将此表示左右两个颜色的元组转换为渐变色。
public static implicit operator GradientColor((Color Left, Color Right) gradient)
Parameters
Returns
- GradientColor
转换后的渐变色。