Class Blend
Defines a blend pattern. This class cannot be inherited.
public sealed class Blend
- Inheritance
-
Blend
- Inherited Members
Remarks
The typical blend class usage is defining a blend pattern for brush. And thus the blend properties should be initialized carefully. Null arrays are not allowed. The brush will throw the appropriate exception if blend factors or positions array are empty or their length is not the same. If there are two or more elements in the positions array then the first element should be 0 and the last should be 1.
Constructors
Blend()
Initializes a new instance of the Blend class. The number of elements in the factor and blend arrays will be equal to 1.
public Blend()
Blend(int)
Initializes a new instance of the Blend class with the specified number of factors and positions.
public Blend(int count)
Parameters
count
intThe number of elements in the factor and position arrays.
Properties
Factors
Gets or sets the array of blend factors for the gradient.
public float[] Factors { get; set; }
Property Value
- float[]
The array of blend factors that specify the percentages of the starting color and the ending color to be used at the corresponding position.
Positions
Gets or sets the array of blend positions for the gradient.
public float[] Positions { get; set; }
Property Value
- float[]
The array of blend positions that specify the percentages of distance along the gradient line.
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
obj
objectThe object to test.
Returns
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
- int
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.