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.

Properties

PropertyTypeDescription
compoundTypeMsoLineStyleSpecifies the line compound type.
dashStyleMsoLineDashStyleSpecifies the line dash type.
capTypeLineCapTypeSpecifies the ending caps.
joinTypeLineJoinTypeSpecifies the line join type.
beginArrowheadStyleMsoArrowheadStyleGets and sets the begin arrow type of the line.
beginArrowheadWidthMsoArrowheadWidthGets and sets the begin arrow width type of the line.
beginArrowheadLengthMsoArrowheadLengthGets and sets the begin arrow length type of the line.
endArrowheadStyleMsoArrowheadStyleGets and sets the end arrow type of the line.
endArrowheadWidthMsoArrowheadWidthGets and sets the end arrow width type of the line.
endArrowheadLengthMsoArrowheadLengthGets and sets the end arrow length type of the line.
weightnumberGets or sets the weight of the line in unit of points.
fillTypeFillTypeGets and sets fill type
transparencynumberReturns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
gradientFillGradientFillReadonly. Gets GradientFill object.
textureFillTextureFillReadonly. Gets TextureFill object.
solidFillSolidFillReadonly. Gets SolidFill object.
patternFillPatternFillReadonly. Gets PatternFill object.
gradientColorTypeGradientColorTypeReadonly. Returns the gradient color type for the specified fill.
gradientStyleGradientStyleTypeReadonly. Returns the gradient style for the specified fill.
gradientColor1ColorReadonly. Returns the gradient color 1 for the specified fill.
gradientColor2ColorReadonly. Returns the gradient color 2 for the specified fill.
gradientDegreenumberReadonly. Returns the gradient degree for the specified fill. Only applies for Excel 2007.
gradientVariantnumberReadonly. Returns the gradient variant for the specified fill. Only applies for Excel 2007.
presetColorGradientPresetTypeReadonly. Returns the gradient preset color for the specified fill.
textureTextureTypeRepresents the texture type for the specified fill.
patternFillPatternRepresents an area’s display pattern.
pictureFormatTypeFillPictureTypeGets and sets the picture format type.
scalenumberGets and sets the picture format scale.
imageDataUint8ArrayGets and sets the picture image data.

Methods

MethodDescription
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.
getHashCode()Gets the hash code.
equals(VObject)Determines whether this instance has the same value as another specified LineFormat object.

constructor(FillFormat)

Constructs from a parent object convertible to this.

constructor(obj: FillFormat);

Parameters:

ParameterTypeDescription
objFillFormatThe parent object.

compoundType

Specifies the line compound type.

compoundType : MsoLineStyle;

dashStyle

Specifies the line dash type.

dashStyle : MsoLineDashStyle;

capType

Specifies the ending caps.

capType : LineCapType;

joinType

Specifies the line join type.

joinType : LineJoinType;

beginArrowheadStyle

Gets and sets the begin arrow type of the line.

beginArrowheadStyle : MsoArrowheadStyle;

beginArrowheadWidth

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

beginArrowheadWidth : MsoArrowheadWidth;

beginArrowheadLength

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

beginArrowheadLength : MsoArrowheadLength;

endArrowheadStyle

Gets and sets the end arrow type of the line.

endArrowheadStyle : MsoArrowheadStyle;

endArrowheadWidth

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

endArrowheadWidth : MsoArrowheadWidth;

endArrowheadLength

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

endArrowheadLength : MsoArrowheadLength;

weight

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

weight : number;

fillType

Gets and sets fill type

fillType : FillType;

transparency

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

transparency : number;

gradientFill

Readonly. Gets GradientFill object.

gradientFill : GradientFill;

textureFill

Readonly. Gets TextureFill object.

textureFill : TextureFill;

solidFill

Readonly. Gets SolidFill object.

solidFill : SolidFill;

patternFill

Readonly. Gets PatternFill object.

patternFill : PatternFill;

gradientColorType

Readonly. Returns the gradient color type for the specified fill.

gradientColorType : GradientColorType;

gradientStyle

Readonly. Returns the gradient style for the specified fill.

gradientStyle : GradientStyleType;

gradientColor1

Readonly. Returns the gradient color 1 for the specified fill.

gradientColor1 : Color;

gradientColor2

Readonly. Returns the gradient color 2 for the specified fill.

gradientColor2 : Color;

Remarks

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

gradientDegree

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

gradientDegree : number;

Remarks

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

gradientVariant

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

gradientVariant : 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.

presetColor

Readonly. Returns the gradient preset color for the specified fill.

presetColor : GradientPresetType;

texture

Represents the texture type for the specified fill.

texture : TextureType;

pattern

Represents an area’s display pattern.

pattern : FillPattern;

pictureFormatType

Gets and sets the picture format type.

pictureFormatType : FillPictureType;

scale

Gets and sets the picture format scale.

scale : number;

imageData

Gets and sets the picture image data.

imageData : Uint8Array;

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.

getHashCode()

Gets the hash code.

getHashCode() : number;

equals(VObject)

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

equals(obj: VObject) : boolean;

Parameters:

ParameterTypeDescription
objVObjectThe 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.