LineFormat — Aspose.Slides FOSS for .NET API Reference

The LineFormat class controls the border/outline of a shape. It provides properties for width, dash style, cap style, join style, arrowheads, and line fill.

Package: Aspose.Slides.Foss (net9.0)

using Aspose.Slides.Foss;
public class LineFormat : ILineFormat

Properties

PropertyTypeAccessDescription
IsFormatNotDefinedboolReadWhether line formatting is undefined.
FillFormatILineFillFormatReadFill settings for the line itself (solid, gradient, pattern).
WidthfloatReadLine width in points.
DashStyleLineDashStyleReadDash style (Solid, Dash, Dot, DashDot, etc.).
CustomDashPatternIList<float>ReadCustom dash/gap pattern values.
StyleLineStyleReadLine style (Single, ThinThin, ThickThin, etc.).
CapStyleLineCapStyleReadEnd-cap style (Flat, Round, Square).
AlignmentLineAlignmentReadLine alignment relative to shape border.
JoinStyleLineJoinStyleReadCorner join style (Round, Bevel, Miter).
MiterLimitfloatReadMiter join limit.
BeginArrowheadStyleLineArrowheadStyleReadStart arrowhead shape.
EndArrowheadStyleLineArrowheadStyleReadEnd arrowhead shape.
BeginArrowheadWidthLineArrowheadWidthReadStart arrowhead width.
EndArrowheadWidthLineArrowheadWidthReadEnd arrowhead width.
BeginArrowheadLengthLineArrowheadLengthReadStart arrowhead length.
EndArrowheadLengthLineArrowheadLengthReadEnd arrowhead length.

Usage Examples

Read Line Properties

using Aspose.Slides.Foss;

using var prs = new Presentation("deck.pptx");
var shape = prs.Slides[0].Shapes[0];
var line = shape.LineFormat;

Console.WriteLine($"Width: {line.Width}pt");
Console.WriteLine($"Dash: {line.DashStyle}");
Console.WriteLine($"Cap: {line.CapStyle}");
Console.WriteLine($"Join: {line.JoinStyle}");

See Also