Class Blend

Class Blend

Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.2.0)

Defines a blend pattern. This class cannot be inherited.

public sealed class Blend

Inheritance

objectBlend

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

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 Aspose.Imaging.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 Aspose.Imaging.Blend class with the specified number of factors and positions.

public Blend(int count)

Parameters

count int

The 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[]

Positions

Gets or sets the array of blend positions for the gradient.

public float[] Positions { get; set; }

Property Value

float[]

Methods

Equals(object)

Tests whether the specified object is a Aspose.Imaging.Blend class and is equivalent to this Aspose.Imaging.Blend class.

public override bool Equals(object obj)

Parameters

obj object

The object to test.

Returns

bool

True if obj is a Aspose.Imaging.Blend class equivalent to this Aspose.Imaging.Blend class; otherwise, false.

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.