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 : ILineFormatProperties
| Property | Type | Access | Description |
|---|---|---|---|
IsFormatNotDefined | bool | Read | Whether line formatting is undefined. |
FillFormat | ILineFillFormat | Read | Fill settings for the line itself (solid, gradient, pattern). |
Width | float | Read | Line width in points. |
DashStyle | LineDashStyle | Read | Dash style (Solid, Dash, Dot, DashDot, etc.). |
CustomDashPattern | IList<float> | Read | Custom dash/gap pattern values. |
Style | LineStyle | Read | Line style (Single, ThinThin, ThickThin, etc.). |
CapStyle | LineCapStyle | Read | End-cap style (Flat, Round, Square). |
Alignment | LineAlignment | Read | Line alignment relative to shape border. |
JoinStyle | LineJoinStyle | Read | Corner join style (Round, Bevel, Miter). |
MiterLimit | float | Read | Miter join limit. |
BeginArrowheadStyle | LineArrowheadStyle | Read | Start arrowhead shape. |
EndArrowheadStyle | LineArrowheadStyle | Read | End arrowhead shape. |
BeginArrowheadWidth | LineArrowheadWidth | Read | Start arrowhead width. |
EndArrowheadWidth | LineArrowheadWidth | Read | End arrowhead width. |
BeginArrowheadLength | LineArrowheadLength | Read | Start arrowhead length. |
EndArrowheadLength | LineArrowheadLength | Read | End 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}");