aspose.cells

Class GradientFill

Represents the gradient fill.

Property Getters/Setters Summary
functiongetAngle()
function
setAngle(value)
           The angle of linear fill.
functiongetDirectionType()
Gets the gradient direction type. The value of the property is GradientDirectionType integer constant.
functiongetFillType()
Gets the gradient fill type. The value of the property is GradientFillType integer constant.
functiongetGradientColor1()
Gets gradient color 1. Applies to Excel97-2003
functiongetGradientColor2()
Gets gradient color 2. Applies to Excel97-2003
functiongetGradientColorType()
Gets gradient color type. Applies to Excel97-2003 The value of the property is GradientColorType integer constant.
functiongetGradientDegree()
Gets gradient degree. Applies to Excel97-2003
functiongetGradientStops()
Represents the gradient stop collection.
functiongetGradientStyle()
Gets gradient style type. Applies to Excel97-2003 The value of the property is GradientStyleType integer constant.
functiongetPresetColor()
function
           Returns the gradient preset color for the specified fill. Applies to Excel97-2003 The value of the property is GradientPresetType integer constant.
functiongetVariant()
Gets variant. Applies to Excel97-2003
 
Method Summary
functionequals(obj)
/
functionhashCode()
Gets the hash code.
functionsetGradient(type, angle, direction)
Set the gradient fill type and direction.
functionsetOneColorGradient(color, degree, style, variant)
Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
functionsetPresetColorGradient(presetColor, style, variant)
Sets the specified fill to a preset-color gradient. Only applies for Excel 97-2003
functionsetTwoColorGradient(color1, color2, style, variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
functionsetTwoColorGradient(color1, transparency1, color2, transparency2, style, variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
 

    • Property Getters/Setters Detail

      • getGradientStops : GradientStopCollection 

        function getGradientStops()
        
        Represents the gradient stop collection.
      • getFillType : Number 

        function getFillType()
        
        Gets the gradient fill type. The value of the property is GradientFillType integer constant.
      • getDirectionType : Number 

        function getDirectionType()
        
        Gets the gradient direction type. The value of the property is GradientDirectionType integer constant.
      • getAngle/setAngle : Number 

        function getAngle() / function setAngle(value)
        
        The angle of linear fill.
      • getGradientColor1 : Color 

        function getGradientColor1()
        
        Gets gradient color 1. Applies to Excel97-2003
      • getGradientColor2 : Color 

        function getGradientColor2()
        
        Gets gradient color 2. Applies to Excel97-2003
      • getGradientDegree : Number 

        function getGradientDegree()
        
        Gets gradient degree. Applies to Excel97-2003
      • getGradientColorType : Number 

        function getGradientColorType()
        
        Gets gradient color type. Applies to Excel97-2003 The value of the property is GradientColorType integer constant.
      • getPresetColor/setPresetColor : Number 

        function getPresetColor() / function setPresetColor(value)
        
        Returns the gradient preset color for the specified fill. Applies to Excel97-2003 The value of the property is GradientPresetType integer constant.
      • getVariant : Number 

        function getVariant()
        
        Gets variant. Applies to Excel97-2003
      • getGradientStyle : Number 

        function getGradientStyle()
        
        Gets gradient style type. Applies to Excel97-2003 The value of the property is GradientStyleType integer constant.
    • Method Detail

      • setGradient

        function setGradient(type, angle, direction)
        Set the gradient fill type and direction.
        Parameters:
        type: Number - A GradientFillType value. Gradient fill type.
        angle: Number - The angle. Only applies for GradientFillType.Linear.
        direction: Number - A GradientDirectionType value. The direction type. Only applies for GradientFillType.Radial and GradientFillType.Rectangle.
      • setPresetColorGradient

        function setPresetColorGradient(presetColor, style, variant)
        Sets the specified fill to a preset-color gradient. Only applies for Excel 97-2003
        Parameters:
        presetColor: Number - A GradientPresetType value. Preset color type
        style: Number - A GradientStyleType value. Gradient shading style.
        variant: Number - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.
      • setOneColorGradient

        function setOneColorGradient(color, degree, style, variant)
        Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
        Parameters:
        color: Color - One gradient color.
        degree: Number - The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
        style: Number - A GradientStyleType value. Gradient shading style.
        variant: Number - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.
      • setTwoColorGradient

        function setTwoColorGradient(color1, color2, style, variant)
        Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
        Parameters:
        color1: Color - One gradient color.
        color2: Color - Two gradient color.
        style: Number - A GradientStyleType value. Gradient shading style.
        variant: Number - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.
      • setTwoColorGradient

        function setTwoColorGradient(color1, transparency1, color2, transparency2, style, variant)
        Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
        Parameters:
        color1: Color - One gradient color.
        transparency1: Number - The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
        color2: Color - Two gradient color.
        transparency2: Number - The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
        style: Number - A GradientStyleType value. Gradient shading style.
        variant: Number - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.
      • equals

        function equals(obj)
        /
        Parameters:
        obj: Object -
        Returns:
      • hashCode

        function hashCode()
        Gets the hash code.
        Returns: