com.aspose.imaging
Class Blend

java.lang.Object
  extended by com.aspose.imaging.Blend

public final class Blend
extends java.lang.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 Summary
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.
 
Method Summary
 boolean equals(java.lang.Object obj)
           Tests whether the specified object is a Blend class and is equivalent to this Blend class.
 float[] getFactors()
           Gets 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 Blend classes are different.
static boolean op_Inequality(Blend blend1, Blend blend2)
          todo not used Tests whether two specified Blend classes are equivalent.
 void setFactors(float[] value)
           Sets the array of blend factors for the gradient.
 void setPositions(float[] value)
           Sets the array of blend positions for the gradient.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Blend

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.


Blend

public Blend(int count)

Initializes a new instance of the Blend} class with the specified number of factors and positions.

Parameters:
count - The number of elements in the factor and position arrays.
Method Detail

equals

public boolean equals(java.lang.Object obj)

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

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to test.
Returns:
True if obj is a Blend class equivalent to this Blend class; otherwise, false.

getFactors

public float[] getFactors()

Gets 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.


getPositions

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.


hashCode

public int hashCode()

Returns a hash code for this instance.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

op_Equality

public static boolean op_Equality(Blend blend1,
                                  Blend blend2)

Tests whether two specified Blend classes are different.

Parameters:
blend1 - The Blend that is to the left of the inequality operator.
blend2 - The Blend that is to the right of the inequality operator.
Returns:
True if the two Blend classes are different; otherwise, false.

op_Inequality

public static boolean op_Inequality(Blend blend1,
                                    Blend blend2)
todo not used

Tests whether two specified Blend classes are equivalent.

Parameters:
blend1 - The Blend that is to the left of the equality operator.
blend2 - The Blend that is to the right of the equality operator.
Returns:
True if the two Blend classes are equal; otherwise, false.

setFactors

public void setFactors(float[] value)

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.


setPositions

public void setPositions(float[] value)

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.