Packages

 

com.aspose.imaging

Interfaces

Classes

Exceptions

com.aspose.imaging

Class ColorBlend



  • public final class ColorBlend
    extends Object

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

    • Constructor Summary

      Constructors 
      Constructor and Description
      ColorBlend()
      Initializes a new instance of the com.aspose.imaging.ColorBlend class.
      ColorBlend(int count)
      Initializes a new instance of the com.aspose.imaging.ColorBlend class with the specified number of colors and positions.
    • Constructor Detail

      • ColorBlend

        public ColorBlend()

        Initializes a new instance of the com.aspose.imaging.ColorBlend class.

      • ColorBlend

        public ColorBlend(int count)

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

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

      • getColors

        public Color[] getColors()

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

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

        public void setColors(Color[] value)
      • getPositions

        public float[] getPositions()

        Gets or sets the positions along a gradient line.

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

        public void setPositions(float[] value)
      • equals

        public boolean equals(Object obj)

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

        Overrides:
        equals in class Object
        Parameters:
        obj - The object to test.
        Returns:
        True if obj is a com.aspose.imaging.ColorBlend class equivalent to this com.aspose.imaging.ColorBlend 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.