[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ILineFormat

ILineFormat Interface

Represents line and arrowhead formatting for a shape or chart element.

This interface provides access to line appearance settings such as solid or patterned color, fill type, dash style, cap style, join style, transparency, visibility, weight, and arrowhead settings at both the beginning and end of a line. It is typically obtained from APIs such as Line.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface ILineFormat
Public Interface ILineFormat
Examples
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
ILineFormat line = shape.Line;
line.Color.RGB = Color.Red;
line.Weight = 2.0;
line.EndArrowheadStyle = ArrowheadStyle.Triangle;

Properties

Name Description
BeginArrowheadLength

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

Use this method to retrieve the current ArrowheadLength setting for the line's beginning arrowhead.

BeginArrowheadStyle

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

Use this method to retrieve the current ArrowheadStyle applied to the beginning of a connector or shape line.

BeginArrowheadWidth

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

Use this method to retrieve the current ArrowheadWidth setting for the line's beginning arrowhead.

CapStyle

Gets or sets the cap style for the end of the line. Can be one of the LineCapStyle constants.

Color

Returns the IColorFormat object that represents the specified solid color.

Use this method to access or modify the solid color settings of the line.

DashStyle

Gets or sets the dash style for the specified line. Can be one of the LineDashStyle constants.

EndArrowheadLength

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

Use this method to retrieve the current ArrowheadLength setting for the line's ending arrowhead.

EndArrowheadStyle

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

Use this method to retrieve the current ArrowheadStyle applied to the end of a connector or shape line.

EndArrowheadWidth

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

Use this method to read the current end arrowhead width configured for the line.

GradientAngle

Gets or sets the angle of the gradient line for the specified line format.

Use this property to get or set the direction of a gradient that has been applied to the line.

GradientDegree

Returns the gradient degree of the specified one-color shaded line as a value from 0.0 (dark) through 1.0 (light).

Use this property to retrieve the shading intensity that was applied by OneColorGradient(GradientStyle, int, double).

GradientStops

Returns the end point for the gradient line. This property is read-only.

GradientStyle

Returns the gradient style for the specified line.

Use this method to determine how the current gradient is applied to the line, such as horizontal, vertical, or diagonal shading.

GradientVariant

Returns the shade variant for the specified fill as an integer value from 1 through 4.

This property indicates which gradient variant is applied to the line when a gradient fill is used.

InsetPen

Gets or sets whether lines are drawn inside the specified shape's boundaries.

This property indicates whether the line is rendered within the shape outline instead of being centered on the shape boundary.

JoinStyle

Gets or sets the corners style of two intersecting lines. Can be one of the LineJoinStyle constants.

Pattern

Returns the line pattern.

Use this method to retrieve the current PatternType applied to the line after the line has been configured with a pattern fill.

PatternColor

Returns the IColorFormat object that represents the specified color of patterns.

Use this property to access and modify the color applied to a patterned line, typically after calling Patterned(PatternType) to set the line to a pattern fill.

Style

Gets or sets the LineStyle object that represents the ILineFormat style.

Use this method to retrieve the current compound line style applied to a shape line, such as Single or ThickBetweenThin.

Transparency

Gets or sets the degree of transparency of the specified line as a value from 0.0 (opaque) through 1.0 (transparent).

Type

Returns the fill type of the line.

Use this property to determine whether the line is currently configured with a solid, patterned, or gradient fill.

Visible

Gets or sets whether the object is visible.

Use this property to check whether the line for the shape is currently displayed.

Weight

Gets or sets the weight of the line.

This value represents the thickness applied to the line formatting of the shape.

Methods

Name Description
OneColorGradient(GradientStyle, int, double)

Sets the specified line to a one-color gradient.

Use degree to control the gradient intensity from dark to light.

Patterned(PatternType)

Sets the specified line to a pattern color.

Use this method to apply a patterned fill to the line by specifying a PatternType.

PresetGradient(GradientStyle, int, PresetGradientType)

Sets the specified line to a preset gradient.

Use this method to apply one of the predefined gradient combinations to the line. The gradient style controls the direction of the gradient, and the variant selects one of the available preset layouts for that style.

Solid()

Sets the specified line to a uniform color.

After calling this method, use Color to configure the solid color of the line.

TwoColorGradient(GradientStyle, int)

Sets the specified line to a two-color gradient.

Use the style and variant parameters to choose one of the built-in two-color gradient patterns for the line. The supported styles are DiagonalDown, DiagonalUp, FromCenter, FromCorner, FromTitle, Horizontal, and Vertical.