XlsShapeLineFormat module

class XlsShapeLineFormat.XlsShapeLineFormat

Bases: XlsObject, IShapeLineFormat

Represents the line formatting for a shape in an Excel worksheet.

This class provides properties and methods for manipulating line formatting options such as line color, weight, style, arrow settings, and other visual aspects of shape outlines.

property BackColor: Color

Gets or sets the background color of the line.

Used for patterned lines where both foreground and background colors are needed.

Returns:

A Color object representing the background color of the line.

Return type:

Color

property BackKnownColor: ExcelColors

Gets or sets the background color of the line from a predefined set of Excel colors.

Used for patterned lines where both foreground and background colors are needed.

Returns:

An enumeration value representing the predefined Excel background color.

Return type:

ExcelColors

property BeginArrowHeadStyle: ShapeArrowStyleType

Gets or sets the style of the arrowhead at the beginning of the line.

Returns:

An enumeration value representing the arrowhead style at the beginning of the line.

Return type:

ShapeArrowStyleType

property BeginArrowheadLength: ShapeArrowLengthType

Gets or sets the length of the arrowhead at the beginning of the line.

Returns:

An enumeration value representing the arrowhead length at the beginning of the line.

Return type:

ShapeArrowLengthType

property BeginArrowheadWidth: ShapeArrowWidthType

Gets or sets the width of the arrowhead at the beginning of the line.

Returns:

An enumeration value representing the arrowhead width at the beginning of the line.

Return type:

ShapeArrowWidthType

Clone(parent: SpireObject) XlsShapeLineFormat

Creates a clone of this line format.

This method creates a new line format object with the same properties as this one.

Parameters:

parent (SpireObject) – The parent object for the cloned line format.

Returns:

A new line format object that is a copy of this one.

Return type:

XlsShapeLineFormat

property DashStyle: ShapeDashLineStyleType

Gets or sets the dash style for the line.

The dash style determines the pattern of dashes and gaps used to draw the line.

Returns:

An enumeration value representing the dash style of the line.

Return type:

ShapeDashLineStyleType

property EndArrowHeadStyle: ShapeArrowStyleType

Gets or sets the style of the arrowhead at the end of the line.

Returns:

An enumeration value representing the arrowhead style at the end of the line.

Return type:

ShapeArrowStyleType

property EndArrowheadLength: ShapeArrowLengthType

Gets or sets the length of the arrowhead at the end of the line.

Returns:

An enumeration value representing the arrowhead length at the end of the line.

Return type:

ShapeArrowLengthType

property EndArrowheadWidth: ShapeArrowWidthType

Gets or sets the width of the arrowhead at the end of the line.

Returns:

An enumeration value representing the arrowhead width at the end of the line.

Return type:

ShapeArrowWidthType

property ForeColor: Color

Gets or sets the foreground color of the line.

Returns:

A Color object representing the foreground color of the line.

Return type:

Color

property ForeKnownColor: ExcelColors

Gets or sets the foreground color of the line from a predefined set of Excel colors.

Returns:

An enumeration value representing the predefined Excel foreground color.

Return type:

ExcelColors

property HasPattern: bool

Gets or sets whether the line has a pattern.

Returns:

True if the line has a pattern; otherwise, False.

Return type:

bool

property IsRound: bool

Gets or sets whether the line join style is round.

When True, the corners where two line segments meet are rounded. When False, the corners are sharp.

Returns:

True if the line join style is round; otherwise, False.

Return type:

bool

property NoFill: bool

Gets or sets whether the line has no fill.

When True, the line is transparent regardless of other appearance settings.

Returns:

True if the line has no fill; otherwise, False.

Return type:

bool

property Pattern: GradientPatternType

Gets or sets the pattern type for the line.

Patterns provide a predefined arrangement of foreground and background colors for the line.

Returns:

An enumeration value representing the pattern type of the line.

Return type:

GradientPatternType

property Style: ShapeLineStyleType

Gets or sets the line style.

The line style determines the appearance of the line, such as single, double, or thick.

Returns:

An enumeration value representing the style of the line.

Return type:

ShapeLineStyleType

property Transparency: float

Gets or sets the transparency level of the line.

The value ranges from 0.0 (completely opaque) to 1.0 (completely transparent).

Returns:

The transparency level of the line.

Return type:

float

property Visible: bool

Gets or sets whether the line is visible.

Returns:

True if the line is visible; otherwise, False.

Return type:

bool

property Weight: float

Gets or sets the weight (thickness) of the line in points.

Returns:

The weight of the line in points.

Return type:

float