a:ln (Line Properties) is the comprehensive stroke/outline container for DrawingML. It is defined in ECMA-376 Part 1 §20.1.2.2.13 and controls all visual properties of a line or shape outline, including width, color, dash pattern, end caps, and joins.
Purpose and Scope
Line properties control the appearance of:
Shape outlines — Borders of rectangles, circles, polygons
Connectors — Lines and arrows connecting shapes
Text underlines — Text run decorations
Table borders — Cell and table grid lines
Path strokes — Custom geometry outlines
Line properties consist of three groups:
Stroke Appearance — Width, color (fill), and dash pattern
End Styling — Line cap style, arrow heads/tails
Join Styling — How corners/joins are rendered
Rendering Workflow
Determine stroke width — Read w attribute
Determine stroke color — Read fill child element
Determine stroke pattern — Read dash style
Determine end caps — Read cap attribute
Determine joins — Read join element (round, bevel, miter)
Determine arrow heads — Read a:headEnd/a:tailEnd
Render — Paint outline with all properties applied
var line = new Outline { Width = 25400, Cap = LineCapValues.Round }; // 2pt, round ends
line.Append(new SolidFill(
new RgbColorModelHex { Val = "0070C0" })); // Blue
line.Append(new PresetDash { Val = PresetLineDashValues.Dash });
line.Append(new Round());
var line = new Outline { Width = 38100, CompoundLine = CompoundLineValues.Double }; // 3pt double line
line.Append(new SolidFill(
new SchemeColor { Val = SchemeColorValues.Accent1 })); // Theme color
line.Append(new PresetDash { Val = PresetLineDashValues.Solid });
line.Append(new Bevel());
var line = new Outline { Width = 12700, Cap = LineCapValues.Square }; // Square ends
line.Append(new SolidFill(
new RgbColorModelHex { Val = "70AD47" })); // Green
line.Append(new PresetDash { Val = PresetLineDashValues.SystemDot });
line.Append(new Miter());
var line = new Outline { Width = 38100, Alignment = PenAlignmentValues.Inside }; // 3pt, inside edge
line.Append(new SolidFill(
new RgbColorModelHex { Val = "2F5233" })); // Dark green
line.Append(new PresetDash { Val = PresetLineDashValues.Solid });
line.Append(new Round());
Outline vs Border: In DrawingML context, a:ln is a line stroke around shape/text geometry, not a table border. Table borders use individual cell lines (a:lnL, a:lnR, a:lnT, a:lnB).
No Stroke: Use a:noFill as child element to render shape with no outline (invisible border).
Single Stroke Definition: A shape can have only one outline. Multiple a:ln elements are invalid; use groups or connectors for multi-stroke effects.
Dash Patterns: a:prstDash (preset) or a:custDash (custom) define stroke pattern. Preset is most common.
Color Gradient: Line fills can be solid, gradient, or pattern—not just single colors. Gradients flow along the stroke direction.
Arrow Heads: a:headEnd and a:tailEnd add arrows or other line endings (circles, diamonds, etc.). Only applicable to connector shapes.
Line Joins: Line join styles (a:round, a:bevel, a:miter) control how line segments connect (corners). Default is miter.
Compatibility: Line properties structure is consistent across all Office formats supporting shapes (Presentation, Drawing, Spreadsheet).
Privacy Notice
This site stores your theme preference and this acknowledgement in localStorage — no cookies, no tracking. When you use the contact form, your message is sent via Formspree (USA) to reach us.