Class LineFormat

Class LineFormat

Namespace: Aspose.Cells.Drawing
Assembly: Aspose.Cells.dll (25.2.0)

Represents all setting of the line.

public class LineFormat : FillFormat

Inheritance

objectFillFormatLineFormat

Inherited Members

FillFormat.SetOneColorGradient(Color, double, GradientStyleType, int), FillFormat.SetTwoColorGradient(Color, Color, GradientStyleType, int), FillFormat.SetTwoColorGradient(Color, double, Color, double, GradientStyleType, int), FillFormat.SetPresetColorGradient(GradientPresetType, GradientStyleType, int), FillFormat.Equals(object), FillFormat.GetHashCode(), FillFormat.FillType, FillFormat.Transparency, FillFormat.GradientFill, FillFormat.TextureFill, FillFormat.SolidFill, FillFormat.PatternFill, FillFormat.GradientColorType, FillFormat.GradientStyle, FillFormat.GradientColor1, FillFormat.GradientColor2, FillFormat.GradientDegree, FillFormat.GradientVariant, FillFormat.PresetColor, FillFormat.Texture, FillFormat.Pattern, FillFormat.PictureFormatType, FillFormat.Scale, FillFormat.ImageData, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

csharp
[C#]
//Instantiating a Workbook object
Workbook workbook = new Workbook();
ShapeCollection shapes = workbook.Worksheets[0].Shapes;
Shape shape = shapes.AddRectangle(1, 0, 1, 0, 50, 100);
LineFormat lineFmt = shape.Line;

//do your business

Properties

BeginArrowheadLength

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

public MsoArrowheadLength BeginArrowheadLength { get; set; }

Property Value

MsoArrowheadLength

Examples

csharp
[C#]
lineFmt.BeginArrowheadLength = MsoArrowheadLength.Long;

BeginArrowheadStyle

Gets and sets the begin arrow type of the line.

public MsoArrowheadStyle BeginArrowheadStyle { get; set; }

Property Value

MsoArrowheadStyle

Examples

csharp
[C#]
lineFmt.BeginArrowheadStyle = MsoArrowheadStyle.ArrowOpen;

BeginArrowheadWidth

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

public MsoArrowheadWidth BeginArrowheadWidth { get; set; }

Property Value

MsoArrowheadWidth

Examples

csharp
[C#]
lineFmt.BeginArrowheadWidth = MsoArrowheadWidth.Medium;

CapType

Specifies the ending caps.

public LineCapType CapType { get; set; }

Property Value

LineCapType

Examples

csharp
[C#]
lineFmt.CapType = LineCapType.Flat;

CompoundType

Specifies the line compound type.

public MsoLineStyle CompoundType { get; set; }

Property Value

MsoLineStyle

Examples

csharp
[C#]
lineFmt.CompoundType = MsoLineStyle.Single;

DashStyle

Specifies the line dash type.

public MsoLineDashStyle DashStyle { get; set; }

Property Value

MsoLineDashStyle

Examples

csharp
[C#]
lineFmt.DashStyle = MsoLineDashStyle.Solid;

EndArrowheadLength

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

public MsoArrowheadLength EndArrowheadLength { get; set; }

Property Value

MsoArrowheadLength

Examples

csharp
[C#]
lineFmt.EndArrowheadLength = MsoArrowheadLength.Long;

EndArrowheadStyle

Gets and sets the end arrow type of the line.

public MsoArrowheadStyle EndArrowheadStyle { get; set; }

Property Value

MsoArrowheadStyle

Examples

csharp
[C#]
lineFmt.EndArrowheadStyle = MsoArrowheadStyle.ArrowOpen;

EndArrowheadWidth

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

public MsoArrowheadWidth EndArrowheadWidth { get; set; }

Property Value

MsoArrowheadWidth

Examples

csharp
[C#]
lineFmt.EndArrowheadWidth = MsoArrowheadWidth.Medium;

JoinType

Specifies the line join type.

public LineJoinType JoinType { get; set; }

Property Value

LineJoinType

Examples

csharp
[C#]
lineFmt.JoinType = LineJoinType.Round;

Weight

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

public double Weight { get; set; }

Property Value

double

Examples

csharp
[C#]
lineFmt.Weight = 2.0d;

Methods

Equals(object)

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

public override bool Equals(object obj)

Parameters

obj object

The Aspose.Cells.Drawing.LineFormat object to compare with this instance.

Returns

bool

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.

Examples

csharp
[C#]
//You have to make sure that the index value in this line of code exists
LineFormat obj = workbook.Worksheets[0].Shapes[0].Line;
if (lineFmt.Equals(obj))
{
    //do what you want
}

GetHashCode()

Gets the hash code.

public override int GetHashCode()

Returns

int

Examples

csharp
[C#]
int hashCode = lineFmt.GetHashCode();