Packages

 

com.aspose.imaging

Interfaces

Classes

com.aspose.imaging

Class Blend



  • 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 Summary

      Constructors 
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(Object obj)
      Tests whether the specified object is a com.aspose.imaging.Blend class and is equivalent to this com.aspose.imaging.Blend class.
      float[] getFactors()
      Gets the array of blend factors for the gradient.
      float[] getPositions()
      Gets the array of blend positions for the gradient.
      int hashCode()
      Returns a hash code for this instance.
      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.
    • 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

      • getFactors

        public float[] getFactors()

        Gets the array of blend factors for the gradient.

        Returns:
        The array of blend factors that specify the percentages of the starting color and the ending color to be used at the corresponding position.
      • setFactors

        public void setFactors(float[] value)

        Sets the array of blend factors for the gradient.

        Parameters:
        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 the array of blend positions for the gradient.

        Returns:
        The array of blend positions that specify the percentages of distance along the gradient line.
      • setPositions

        public void setPositions(float[] value)

        Sets the array of blend positions for the gradient.

        Parameters:
        value - The array of blend positions that specify the percentages of distance along the gradient line.
      • equals

        public boolean equals(Object obj)

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

        Overrides:
        equals in class Object
        Parameters:
        obj - The object to test.
        Returns:
        True if obj is a com.aspose.imaging.Blend class equivalent to this com.aspose.imaging.Blend class; otherwise, false.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

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