LineFormat

LineFormat class

Represents all setting of the line.

class LineFormat extends FillFormat;

Constructors

NameDescription
constructor(FillFormat)Constructs from a parent object convertible to this.

Methods

MethodDescription
getCompoundType()Specifies the line compound type.
setCompoundType(MsoLineStyle)Specifies the line compound type.
getDashStyle()Specifies the line dash type.
setDashStyle(MsoLineDashStyle)Specifies the line dash type.
getCapType()Specifies the ending caps.
setCapType(LineCapType)Specifies the ending caps.
getJoinType()Specifies the line join type.
setJoinType(LineJoinType)Specifies the line join type.
getBeginArrowheadStyle()Gets and sets the begin arrow type of the line.
setBeginArrowheadStyle(MsoArrowheadStyle)Gets and sets the begin arrow type of the line.
getBeginArrowheadWidth()Gets and sets the begin arrow width type of the line.
setBeginArrowheadWidth(MsoArrowheadWidth)Gets and sets the begin arrow width type of the line.
getBeginArrowheadLength()Gets and sets the begin arrow length type of the line.
setBeginArrowheadLength(MsoArrowheadLength)Gets and sets the begin arrow length type of the line.
getEndArrowheadStyle()Gets and sets the end arrow type of the line.
setEndArrowheadStyle(MsoArrowheadStyle)Gets and sets the end arrow type of the line.
getEndArrowheadWidth()Gets and sets the end arrow width type of the line.
setEndArrowheadWidth(MsoArrowheadWidth)Gets and sets the end arrow width type of the line.
getEndArrowheadLength()Gets and sets the end arrow length type of the line.
setEndArrowheadLength(MsoArrowheadLength)Gets and sets the end arrow length type of the line.
getWeight()Gets or sets the weight of the line in unit of points.
setWeight(number)Gets or sets the weight of the line in unit of points.
getHashCode()Gets the hash code.
equals(object)Determines whether this instance has the same value as another specified LineFormat object.
isNull()Checks whether the implementation object is null.
getFillType()Gets and sets fill type
setFillType(FillType)Gets and sets fill type
getTransparency()Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
setTransparency(number)Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
getGradientFill()Gets GradientFill object.
getTextureFill()Gets TextureFill object.
getSolidFill()Gets SolidFill object.
getPatternFill()Gets PatternFill object.
getGradientColorType()Returns the gradient color type for the specified fill.
getGradientStyle()Returns the gradient style for the specified fill.
getGradientColor1()Returns the gradient color 1 for the specified fill.
getGradientColor2()Returns the gradient color 2 for the specified fill.
getGradientDegree()Returns the gradient degree for the specified fill. Only applies for Excel 2007.
getGradientVariant()Returns the gradient variant for the specified fill. Only applies for Excel 2007.
getPresetColor()Returns the gradient preset color for the specified fill.
getTexture()Represents the texture type for the specified fill.
setTexture(TextureType)Represents the texture type for the specified fill.
getPattern()Represents an area’s display pattern.
setPattern(FillPattern)Represents an area’s display pattern.
getPictureFormatType()Gets and sets the picture format type.
setPictureFormatType(FillPictureType)Gets and sets the picture format type.
getScale()Gets and sets the picture format scale.
setScale(number)Gets and sets the picture format scale.
getImageData()Gets and sets the picture image data.
setImageData(number[])Gets and sets the picture image data.
setOneColorGradient(Color, number, GradientStyleType, number)Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
setTwoColorGradient(Color, Color, GradientStyleType, number)Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
setTwoColorGradient(Color, number, Color, number, GradientStyleType, number)Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
setPresetColorGradient(GradientPresetType, GradientStyleType, number)Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.

constructor(FillFormat)

Constructs from a parent object convertible to this.

constructor(obj: FillFormat);

Parameters:

ParameterTypeDescription
objFillFormatThe parent object.

getCompoundType()

Specifies the line compound type.

getCompoundType() : MsoLineStyle;

Returns

MsoLineStyle

setCompoundType(MsoLineStyle)

Specifies the line compound type.

setCompoundType(value: MsoLineStyle) : void;

Parameters:

ParameterTypeDescription
valueMsoLineStyleThe value to set.

getDashStyle()

Specifies the line dash type.

getDashStyle() : MsoLineDashStyle;

Returns

MsoLineDashStyle

setDashStyle(MsoLineDashStyle)

Specifies the line dash type.

setDashStyle(value: MsoLineDashStyle) : void;

Parameters:

ParameterTypeDescription
valueMsoLineDashStyleThe value to set.

getCapType()

Specifies the ending caps.

getCapType() : LineCapType;

Returns

LineCapType

setCapType(LineCapType)

Specifies the ending caps.

setCapType(value: LineCapType) : void;

Parameters:

ParameterTypeDescription
valueLineCapTypeThe value to set.

getJoinType()

Specifies the line join type.

getJoinType() : LineJoinType;

Returns

LineJoinType

setJoinType(LineJoinType)

Specifies the line join type.

setJoinType(value: LineJoinType) : void;

Parameters:

ParameterTypeDescription
valueLineJoinTypeThe value to set.

getBeginArrowheadStyle()

Gets and sets the begin arrow type of the line.

getBeginArrowheadStyle() : MsoArrowheadStyle;

Returns

MsoArrowheadStyle

setBeginArrowheadStyle(MsoArrowheadStyle)

Gets and sets the begin arrow type of the line.

setBeginArrowheadStyle(value: MsoArrowheadStyle) : void;

Parameters:

ParameterTypeDescription
valueMsoArrowheadStyleThe value to set.

getBeginArrowheadWidth()

Gets and sets the begin arrow width type of the line.

getBeginArrowheadWidth() : MsoArrowheadWidth;

Returns

MsoArrowheadWidth

setBeginArrowheadWidth(MsoArrowheadWidth)

Gets and sets the begin arrow width type of the line.

setBeginArrowheadWidth(value: MsoArrowheadWidth) : void;

Parameters:

ParameterTypeDescription
valueMsoArrowheadWidthThe value to set.

getBeginArrowheadLength()

Gets and sets the begin arrow length type of the line.

getBeginArrowheadLength() : MsoArrowheadLength;

Returns

MsoArrowheadLength

setBeginArrowheadLength(MsoArrowheadLength)

Gets and sets the begin arrow length type of the line.

setBeginArrowheadLength(value: MsoArrowheadLength) : void;

Parameters:

ParameterTypeDescription
valueMsoArrowheadLengthThe value to set.

getEndArrowheadStyle()

Gets and sets the end arrow type of the line.

getEndArrowheadStyle() : MsoArrowheadStyle;

Returns

MsoArrowheadStyle

setEndArrowheadStyle(MsoArrowheadStyle)

Gets and sets the end arrow type of the line.

setEndArrowheadStyle(value: MsoArrowheadStyle) : void;

Parameters:

ParameterTypeDescription
valueMsoArrowheadStyleThe value to set.

getEndArrowheadWidth()

Gets and sets the end arrow width type of the line.

getEndArrowheadWidth() : MsoArrowheadWidth;

Returns

MsoArrowheadWidth

setEndArrowheadWidth(MsoArrowheadWidth)

Gets and sets the end arrow width type of the line.

setEndArrowheadWidth(value: MsoArrowheadWidth) : void;

Parameters:

ParameterTypeDescription
valueMsoArrowheadWidthThe value to set.

getEndArrowheadLength()

Gets and sets the end arrow length type of the line.

getEndArrowheadLength() : MsoArrowheadLength;

Returns

MsoArrowheadLength

setEndArrowheadLength(MsoArrowheadLength)

Gets and sets the end arrow length type of the line.

setEndArrowheadLength(value: MsoArrowheadLength) : void;

Parameters:

ParameterTypeDescription
valueMsoArrowheadLengthThe value to set.

getWeight()

Gets or sets the weight of the line in unit of points.

getWeight() : number;

setWeight(number)

Gets or sets the weight of the line in unit of points.

setWeight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHashCode()

Gets the hash code.

getHashCode() : number;

equals(object)

Determines whether this instance has the same value as another specified LineFormat object.

equals(obj: object) : boolean;

Parameters:

ParameterTypeDescription
objobjectThe LineFormat object to compare with this instance.

Returns

true if the value of the obj parameter is the same as the value of this instance; otherwise, false. If obj is null, this method returns false.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getFillType()

Gets and sets fill type

getFillType() : FillType;

Returns

FillType

setFillType(FillType)

Gets and sets fill type

setFillType(value: FillType) : void;

Parameters:

ParameterTypeDescription
valueFillTypeThe value to set.

getTransparency()

Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

getTransparency() : number;

setTransparency(number)

Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

setTransparency(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getGradientFill()

Gets GradientFill object.

getGradientFill() : GradientFill;

Returns

GradientFill

getTextureFill()

Gets TextureFill object.

getTextureFill() : TextureFill;

Returns

TextureFill

getSolidFill()

Gets SolidFill object.

getSolidFill() : SolidFill;

Returns

SolidFill

getPatternFill()

Gets PatternFill object.

getPatternFill() : PatternFill;

Returns

PatternFill

getGradientColorType()

Returns the gradient color type for the specified fill.

getGradientColorType() : GradientColorType;

Returns

GradientColorType

getGradientStyle()

Returns the gradient style for the specified fill.

getGradientStyle() : GradientStyleType;

Returns

GradientStyleType

getGradientColor1()

Returns the gradient color 1 for the specified fill.

getGradientColor1() : Color;

Returns

Color

getGradientColor2()

Returns the gradient color 2 for the specified fill.

getGradientColor2() : Color;

Returns

Color

Remarks

Only when the gradient color type is GradientColorType.TwoColors, this property is meaningful.

getGradientDegree()

Returns the gradient degree for the specified fill. Only applies for Excel 2007.

getGradientDegree() : number;

Remarks

Can only be a value from 0.0 (dark) through 1.0 (light).

getGradientVariant()

Returns the gradient variant for the specified fill. Only applies for Excel 2007.

getGradientVariant() : number;

Remarks

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()

Returns the gradient preset color for the specified fill.

getPresetColor() : GradientPresetType;

Returns

GradientPresetType

getTexture()

Represents the texture type for the specified fill.

getTexture() : TextureType;

Returns

TextureType

setTexture(TextureType)

Represents the texture type for the specified fill.

setTexture(value: TextureType) : void;

Parameters:

ParameterTypeDescription
valueTextureTypeThe value to set.

getPattern()

Represents an area’s display pattern.

getPattern() : FillPattern;

Returns

FillPattern

setPattern(FillPattern)

Represents an area’s display pattern.

setPattern(value: FillPattern) : void;

Parameters:

ParameterTypeDescription
valueFillPatternThe value to set.

getPictureFormatType()

Gets and sets the picture format type.

getPictureFormatType() : FillPictureType;

Returns

FillPictureType

setPictureFormatType(FillPictureType)

Gets and sets the picture format type.

setPictureFormatType(value: FillPictureType) : void;

Parameters:

ParameterTypeDescription
valueFillPictureTypeThe value to set.

getScale()

Gets and sets the picture format scale.

getScale() : number;

setScale(number)

Gets and sets the picture format scale.

setScale(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getImageData()

Gets and sets the picture image data.

getImageData() : number[];

Returns

number[]

Remarks

If the fill format is not custom texture format, returns null.

setImageData(number[])

Gets and sets the picture image data.

setImageData(value: number[]) : void;

Parameters:

ParameterTypeDescription
valuenumber[]The value to set.

Remarks

If the fill format is not custom texture format, returns null.

setOneColorGradient(Color, number, GradientStyleType, number)

Sets the specified fill to a one-color gradient. Only applies for Excel 2007.

setOneColorGradient(color: Color, degree: number, style: GradientStyleType, variant: number) : void;

Parameters:

ParameterTypeDescription
colorColorOne gradient color.
degreenumberThe gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
styleGradientStyleTypeGradient shading style.
variantnumberThe 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(Color, Color, GradientStyleType, number)

Sets the specified fill to a two-color gradient. Only applies for Excel 2007.

setTwoColorGradient(color1: Color, color2: Color, style: GradientStyleType, variant: number) : void;

Parameters:

ParameterTypeDescription
color1ColorOne gradient color.
color2ColorTwo gradient color.
styleGradientStyleTypeGradient shading style.
variantnumberThe 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(Color, number, Color, number, GradientStyleType, number)

Sets the specified fill to a two-color gradient. Only applies for Excel 2007.

setTwoColorGradient(color1: Color, transparency1: number, color2: Color, transparency2: number, style: GradientStyleType, variant: number) : void;

Parameters:

ParameterTypeDescription
color1ColorOne gradient color.
transparency1numberThe degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
color2ColorTwo gradient color.
transparency2numberThe degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
styleGradientStyleTypeGradient shading style.
variantnumberThe 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(GradientPresetType, GradientStyleType, number)

Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.

setPresetColorGradient(presetColor: GradientPresetType, style: GradientStyleType, variant: number) : void;

Parameters:

ParameterTypeDescription
presetColorGradientPresetTypePreset color type
styleGradientStyleTypeGradient shading style.
variantnumberThe 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.