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()
methodsetFillType(value)
           Gets and sets fill type The value of the property is FillType integer constant.
methodgetGradientColor1()
           Returns the gradient color 1 for the the specified fill.
methodgetGradientColor2()
           Returns the gradient color 2 for the 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 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 the specified fill. Only applies for Excel 2007.
methodgetImageData()
methodsetImageData(value)
           Gets and sets the picture image data.
methodgetPattern()
methodsetPattern(value)
           Represents an area's display pattern. The value of the property is FillPattern integer constant.
methodgetPatternFill()
           Gets PatternFill object.
methodgetPictureFormatType()
methodsetPictureFormatType(value)
           Gets and sets the picture format type. The value of the property is FillPictureType integer constant.
methodgetPresetColor()
           Returns the gradient preset color for the the specified fill. The value of the property is GradientPresetType integer constant.
methodgetScale()
methodsetScale(value)
           Gets and sets the picture format scale.
methodgetSetType()
methodsetSetType(value)
           Gets the fill format set type. The value of the property is FormatSetType integer constant.
methodgetSolidFill()
           Gets SolidFill object.
methodgetTexture()
methodsetTexture(value)
           Represents the texture type for the specified fill. The value of the property is TextureType integer constant.
methodgetTextureFill()
           Gets TextureFill object.
methodgetTransparency()
methodsetTransparency(value)
           Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
methodgetType()
methodsetType(value)
           Gets and sets the fill type. The value of the property is FillType integer constant.
 
Method Summary
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.

getGradientFill : GradientFill 

GradientFill getGradientFill()
Gets GradientFill object.

getTextureFill : TextureFill 

TextureFill getTextureFill()
Gets TextureFill object.

getSolidFill : SolidFill 

SolidFill getSolidFill()
Gets SolidFill object.

getPatternFill : PatternFill 

PatternFill getPatternFill()
Gets PatternFill object.

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 the specified fill.

getGradientColor2 : Color 

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

getGradientDegree : float 

float getGradientDegree()
Returns the gradient degree for the 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 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 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,return 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.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.