com.aspose.imaging
Class ColorBlend

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

public final class ColorBlend
extends java.lang.Object

Defines arrays of colors and positions used for interpolating color blending in a multicolor gradient. This class cannot be inherited.


Constructor Summary
ColorBlend()
           Initializes a new instance of the ColorBlend class.
ColorBlend(int count)
           Initializes a new instance of the ColorBlend class with the specified number of colors and positions.
 
Method Summary
 Color[] getColors()
           Gets an array of colors that represents the colors to use at corresponding positions along a gradient.
 float[] getPositions()
           Gets the positions along a gradient line.
static boolean op_Equality(ColorBlend colorBlend1, ColorBlend colorBlend2)
           Tests whether two specified ColorBlend classes are different.
static boolean op_Inequality(ColorBlend colorBlend1, ColorBlend colorBlend2)
           Tests whether two specified ColorBlend classes are equivalent.
 void setColors(Color[] value)
           Sets an array of colors that represents the colors to use at corresponding positions along a gradient.
 void setPositions(float[] value)
           Sets the positions along a gradient line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorBlend

public ColorBlend()

Initializes a new instance of the ColorBlend class.


ColorBlend

public ColorBlend(int count)

Initializes a new instance of the ColorBlend class with the specified number of colors and positions.

Parameters:
count - The number of colors and positions in this ColorBlend.
Method Detail

getColors

public Color[] getColors()

Gets an array of colors that represents the colors to use at corresponding positions along a gradient.

Returns:
An array of Color structures that represents the colors to use at corresponding positions along a gradient.

getPositions

public float[] getPositions()

Gets the positions along a gradient line.

Returns:
An array of values that specify percentages of distance along the gradient line.

op_Equality

public static boolean op_Equality(ColorBlend colorBlend1,
                                  ColorBlend colorBlend2)

Tests whether two specified ColorBlend classes are different.

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

op_Inequality

public static boolean op_Inequality(ColorBlend colorBlend1,
                                    ColorBlend colorBlend2)

Tests whether two specified ColorBlend classes are equivalent.

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

setColors

public void setColors(Color[] value)

Sets an array of colors that represents the colors to use at corresponding positions along a gradient.


setPositions

public void setPositions(float[] value)

Sets the positions along a gradient line.