asposecells.api

Class GradientFill

Represents the gradient fill.

Property Getters/Setters Summary
methodgetAngle()
method
setAngle(value)
           The angle of linear fill.
methodgetDirectionType()
Gets the gradient direction type. The value of the property is GradientDirectionType integer constant.
methodgetFillType()
Gets the gradient fill type. The value of the property is GradientFillType integer constant.
methodgetGradientColor1()
Gets gradient color 1. Applies to Excel97-2003
methodgetGradientColor2()
Gets gradient color 2. Applies to Excel97-2003
methodgetGradientColorType()
Gets gradient color type. Applies to Excel97-2003 The value of the property is GradientColorType integer constant.
methodgetGradientDegree()
Gets gradient degree. Applies to Excel97-2003
methodgetGradientStops()
Represents the gradient stop collection.
methodgetGradientStyle()
Gets gradint style type. Applies to Excel97-2003 The value of the property is GradientStyleType integer constant.
methodgetPresetColor()
method
           Returns the gradient preset color for the the specified fill. Applies to Excel97-2003 The value of the property is GradientPresetType integer constant.
methodgetVariant()
Gets variant. Applies to Excel97-2003
 
Method Summary
methodsetGradient(type, angle, direction)
Set the gradient fill type and direction.
methodsetOneColorGradient(color, degree, style, variant)
Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
methodsetPresetColorGradient(presetColor, style, variant)
Sets the specified fill to a preset-color gradient. Only applies for Excel 97-2003
methodsetTwoColorGradient(color1, color2, style, variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
methodsetTwoColorGradient(color1, transparency1, color2, transparency2, style, variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
 

    • Property Getters/Setters Detail

      • getFillType : int 

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

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

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

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

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

        float getGradientDegree()
        
        Gets gradient degree. Applies to Excel97-2003
      • getGradientColorType : int 

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

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

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

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

      • setGradient

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

         setPresetColorGradient(presetColor, style, variant)
        Sets the specified fill to a preset-color gradient. Only applies for Excel 97-2003
        Parameters:
        presetColor: int - A GradientPresetType value. Preset color type
        style: int - A GradientStyleType value. Gradient shading style.
        variant: int - 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

         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: float - The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
        style: int - A GradientStyleType value. Gradient shading style.
        variant: int - 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

         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: int - A GradientStyleType value. Gradient shading style.
        variant: int - 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

         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: float - The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
        color2: Color - Two gradient color.
        transparency2: float - The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
        style: int - A GradientStyleType value. Gradient shading style.
        variant: int - 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.