Class ColorBlend
Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.7.0)
Defines arrays of colors and positions used for interpolating color blending in a multicolor gradient. This class cannot be inherited.
public sealed class ColorBlend
{
private ColorBlend(Color1 color1, Color2 color2, double factor)
{
Color1 = color1;
Color2 = color2;
Factor = factor;
}
public Color Color1 { get; }
public Color Color2 { get; }
public double Factor { get; }
}
Inheritance
Inherited Members
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
ColorBlend()
Initializes a new instance of the Aspose.Imaging.ColorBlend class.
public ColorBlend()
{
}
ColorBlend(int)
Initializes a new instance of the Aspose.Imaging.ColorBlend class with the specified number of colors and positions.
public ColorBlend(int count)
{
}
Parameters
count
int
The number of colors and positions in this Aspose.Imaging.ColorBlend.
Properties
Colors
Gets or sets an array of colors that represents the colors to use at corresponding positions along a gradient.
public Color[] Colors
{
get;
set;
}
Property Value
Color []
Positions
Gets or sets the positions along a gradient line.
public float[] Positions
{
get;
set;
}
Property Value
float []
Methods
Equals(object)
Tests whether the specified object is a Aspose.Imaging.ColorBlend class and is equivalent to this Aspose.Imaging.ColorBlend class.
public override bool Equals(object obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}
var other = (MyCustomType)obj;
return this.Property1 == other.Property1 &&
this.Property2 == other.Property2;
}
Parameters
obj
object
The object to test.
Returns
True if obj’ is a Aspose.Imaging.ColorBlend class equivalent to this Aspose.Imaging.ColorBlend class; otherwise, false.
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
{
}
Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.