Struct ColorEntry
A struct representing a color entry in a gradient.
Inherited Members
Namespace: UnityEngine.Dt.App.Core
Syntax
public readonly struct ColorEntry : IComparable, IEquatable<ColorEntry>
Constructors
ColorEntry(Color, Single)
Creates a new ColorEntry.
Declaration
public ColorEntry(Color color, float position)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The color of the entry. |
Single | position | The position of the entry in the gradient. |
Fields
color
The color of the entry.
Declaration
public readonly Color color
Field Value
Type | Description |
---|---|
Color |
position
The position of the entry in the gradient.
Declaration
public readonly float position
Field Value
Type | Description |
---|---|
Single |
Methods
CompareTo(Object)
Compares this ColorEntry to another object.
Declaration
public readonly int CompareTo(object other)
Parameters
Type | Name | Description |
---|---|---|
Object | other | The other object to compare to. |
Returns
Type | Description |
---|---|
Int32 | 1 if the other object is not a ColorEntry, otherwise the result of comparing the position of the two ColorEntries. |
Implements
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(ColorEntry)
Determines whether the specified object is equal to the current object.
Declaration
public readonly bool Equals(ColorEntry other)
Parameters
Type | Name | Description |
---|---|---|
ColorEntry | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | true if the specified object is equal to the current object; otherwise, false. |
Implements
GetHashCode()
Serves as the default hash function.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the current object. |
Overrides
ToString()
Returns a string representation of the ColorEntry.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
String | A string representation of the ColorEntry. |