asposecells.api

Class FillFormat

Encapsulates the object that represents fill formatting for a shape.

Example:

excel = Workbook()
charts = excel.getWorksheets().get(0).getCharts()
# Create a chart
chart = charts.get(charts.add(ChartType.COLUMN, 1, 1, 10, 10))
chart.getNSeries().add("A1:C5", True)

# Filling the area of the 2nd NSeries with a gradient
chart.getNSeries().get(1).getArea().getFillFormat().setOneColorGradient(Color.getLime(), 1, GradientStyleType.HORIZONTAL, 1)

Property Getters/Setters Summary
methodgetFillType()
method
           Gets and sets fill type The value of the property is FillType integer constant.
methodgetGradientColor1()
Returns the gradient color 1 for the specified fill.
methodgetGradientColor2()
Returns the gradient color 2 for the specified fill.
methodgetGradientColorType()
Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant.
methodgetGradientDegree()
Returns the gradient degree for the specified fill. Only applies for Excel 2007.
methodgetGradientFill()
Gets GradientFill object.
methodgetGradientStyle()
Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant.
methodgetGradientVariant()
Returns the gradient variant for the specified fill. Only applies for Excel 2007.
methodgetImageData()
method
           Gets and sets the picture image data.
methodgetPattern()
method
setPattern(value)
           Represents an area's display pattern. The value of the property is FillPattern integer constant.
methodgetPatternFill()
Gets PatternFill object.
methodgetPictureFormatType()
method
           Gets and sets the picture format type. The value of the property is FillPictureType integer constant.
methodgetPresetColor()
Returns the gradient preset color for the specified fill. The value of the property is GradientPresetType integer constant.
methodgetScale()
method
setScale(value)
           Gets and sets the picture format scale.
methodgetSetType()
method
setSetType(value)
           Gets the fill format set type. The value of the property is FormatSetType integer constant.
methodgetSolidFill()
Gets SolidFill object.
methodgetTexture()
method
setTexture(value)
           Represents the texture type for the specified fill. The value of the property is TextureType integer constant.
methodgetTextureFill()
Gets TextureFill object.
methodgetTransparency()
method
           Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
methodgetType()
method
setType(value)
           Gets and sets the fill type. The value of the property is FillType integer constant.
 
Method Summary
methodequals(obj)
methodhashCode()
Gets the hash code.
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 2007.
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

      • getType/setType : int 

        int getType() / setType(value)
        
        Gets and sets the fill type. The value of the property is FillType integer constant. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getFillType/setFillType : int 

        int getFillType() / setFillType(value)
        
        Gets and sets fill type The value of the property is FillType integer constant.
      • getTransparency/setTransparency : float 

        float getTransparency() / setTransparency(value)
        
        Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
      • getSetType/setSetType : int 

        int getSetType() / setSetType(value)
        
        Gets the fill format set type. The value of the property is FormatSetType integer constant. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getGradientColorType : int 

        int getGradientColorType()
        
        Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant.
      • getGradientStyle : int 

        int getGradientStyle()
        
        Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant.
      • getGradientColor1 : Color 

        Color getGradientColor1()
        
        Returns the gradient color 1 for the specified fill.
      • getGradientColor2 : Color 

        Color getGradientColor2()
        
        Returns the gradient color 2 for the specified fill. Only when the gradient color type is GradientColorType.TwoColors, this property is meaningful.
      • getGradientDegree : float 

        float getGradientDegree()
        
        Returns the gradient degree for the specified fill. Only applies for Excel 2007. Can only be a value from 0.0 (dark) through 1.0 (light).
      • getGradientVariant : int 

        int getGradientVariant()
        
        Returns the gradient variant for the specified fill. Only applies for Excel 2007. Can only 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.
      • getPresetColor : int 

        int getPresetColor()
        
        Returns the gradient preset color for the specified fill. The value of the property is GradientPresetType integer constant.
      • getTexture/setTexture : int 

        int getTexture() / setTexture(value)
        
        Represents the texture type for the specified fill. The value of the property is TextureType integer constant.
      • getPattern/setPattern : int 

        int getPattern() / setPattern(value)
        
        Represents an area's display pattern. The value of the property is FillPattern integer constant.
      • getPictureFormatType/setPictureFormatType : int 

        int getPictureFormatType() / setPictureFormatType(value)
        
        Gets and sets the picture format type. The value of the property is FillPictureType integer constant.
      • getScale/setScale : float 

        float getScale() / setScale(value)
        
        Gets and sets the picture format scale.
      • getImageData/setImageData : byte[] 

        byte[] getImageData() / setImageData(value)
        
        Gets and sets the picture image data. If the fill format is not custom texture format, returns null.
    • Method Detail

      • 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.
      • setPresetColorGradient

         setPresetColorGradient(presetColor, style, variant)
        Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.
        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.
      • equals

        boolean equals(obj)
        Parameters:
        obj: Object -
        Returns:
      • hashCode

        int hashCode()
        Gets the hash code.
        Returns: