public final class Blend extends Object
Defines a blend pattern. This class cannot be inherited.
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.
Constructor and Description |
---|
Blend()
Initializes a new instance of the
Blend class. |
Blend(int count)
Initializes a new instance of the
Blend class with the specified number of factors and positions. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests whether the specified object is a
Aspose.Imaging.Blend class and is equivalent to this Aspose.Imaging.Blend class. |
float[] |
getFactors()
Gets or sets the array of blend factors for the gradient.
|
float[] |
getPositions()
Gets or sets the array of blend positions for the gradient.
|
int |
hashCode()
Returns a hash code for this instance.
|
static boolean |
op_Equality(Blend blend1,
Blend blend2)
Tests whether two specified
Aspose.Imaging.Blend classes are different. |
static boolean |
op_Inequality(Blend blend1,
Blend blend2)
Tests whether two specified
Aspose.Imaging.Blend classes are equivalent. |
void |
setFactors(float[] value)
Gets or sets the array of blend factors for the gradient.
|
void |
setPositions(float[] value)
Gets or sets the array of blend positions for the gradient.
|
public 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(int count)
Initializes a new instance of the Blend
class with the specified number of factors and positions.
count
- The number of elements in the factor and position arrays.public float[] getFactors()
Gets or sets the array of blend factors for the gradient.
Value: The array of blend factors that specify the percentages of the starting color and the ending color to be used at the corresponding position.public void setFactors(float[] value)
Gets or sets the array of blend factors for the gradient.
Value: The array of blend factors that specify the percentages of the starting color and the ending color to be used at the corresponding position.public float[] getPositions()
Gets or sets the array of blend positions for the gradient.
Value: The array of blend positions that specify the percentages of distance along the gradient line.public void setPositions(float[] value)
Gets or sets the array of blend positions for the gradient.
Value: The array of blend positions that specify the percentages of distance along the gradient line.public static boolean op_Equality(Blend blend1, Blend blend2)
Tests whether two specified Aspose.Imaging.Blend
classes are different.
blend1
- The Aspose.Imaging.Blend
that is to the left of the inequality operator.blend2
- The Aspose.Imaging.Blend
that is to the right of the inequality operator.Aspose.Imaging.Blend
classes are different; otherwise, false.public static boolean op_Inequality(Blend blend1, Blend blend2)
Tests whether two specified Aspose.Imaging.Blend
classes are equivalent.
blend1
- The Aspose.Imaging.Blend
that is to the left of the equality operator.blend2
- The Aspose.Imaging.Blend
that is to the right of the equality operator.Aspose.Imaging.Blend
classes are equal; otherwise, false.public boolean equals(Object obj)
Tests whether the specified object is a Aspose.Imaging.Blend
class and is equivalent to this Aspose.Imaging.Blend
class.
Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.