Line
A straight line between two points. All four coordinate attributes are required — line does not support anchor.
Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
x1 |
signed pt | — | Required. Start X |
y1 |
signed pt | — | Required. Start Y |
x2 |
signed pt | — | Required. End X |
y2 |
signed pt | — | Required. End Y |
stroke |
color | — | Line color |
stroke-width |
pt | — | Line thickness |
stroke-dash |
string | — | Dash pattern: "4 2" (4pt dash, 2pt gap) |
line-cap |
string | butt |
butt round square |
Horizontal rule on each page
Section titled “Horizontal rule on each page”<canvas> <layer page="each"> <!-- rule 48pt from the bottom, spanning the full letter width --> <line x1="0pt" y1="744pt" x2="612pt" y2="744pt" stroke="#e0e0e0" stroke-width="0.5pt"/> </layer></canvas>L.canvas(NoAttr, [ L.layer({ page: 'each' }, [ L.line({ x1: '0pt', y1: '744pt', x2: '612pt', y2: '744pt', stroke: '#e0e0e0', strokeWidth: '0.5pt' }), ]),])L.canvas(NoAttr, [ L.layer(LayerAttr(page='each'), [ L.line(LineAttr(x1='0pt', y1='744pt', x2='612pt', y2='744pt', stroke='#e0e0e0', stroke_width='0.5pt')) ])])L::canvas(NoAttr, [ L::layer(new LayerAttr(page: 'each'), [ L::line(new LineAttr(x1: '0pt', y1: '744pt', x2: '612pt', y2: '744pt', stroke: '#e0e0e0', strokeWidth: '0.5pt')), ]),])L.Canvas(NoAttr, [ L.Layer(new() { Page = "each" }, [ L.Line(new() { X1 = "0pt", Y1 = "744pt", X2 = "612pt", Y2 = "744pt", Stroke = "#e0e0e0", StrokeWidth = "0.5pt" }), ]),])Dashed separator
Section titled “Dashed separator”<line x1="40pt" y1="200pt" x2="572pt" y2="200pt" stroke="#aaaaaa" stroke-width="1pt" stroke-dash="6 3"/>L.line({ x1: '40pt', y1: '200pt', x2: '572pt', y2: '200pt', stroke: '#aaaaaa', strokeWidth: '1pt', strokeDash: '6 3' })L.line(LineAttr(x1='40pt', y1='200pt', x2='572pt', y2='200pt', stroke='#aaaaaa', stroke_width='1pt', stroke_dash='6 3'))L::line(new LineAttr(x1: '40pt', y1: '200pt', x2: '572pt', y2: '200pt', stroke: '#aaaaaa', strokeWidth: '1pt', strokeDash: '6 3'))L.Line(new() { X1 = "40pt", Y1 = "200pt", X2 = "572pt", Y2 = "200pt", Stroke = "#aaaaaa", StrokeWidth = "1pt", StrokeDash = "6 3" })Diagonal accent
Section titled “Diagonal accent”<line x1="0pt" y1="0pt" x2="100pt" y2="100pt" stroke="#1a73e8" stroke-width="2pt" line-cap="round"/>L.line({ x1: '0pt', y1: '0pt', x2: '100pt', y2: '100pt', stroke: '#1a73e8', strokeWidth: '2pt', lineCap: 'round' })L.line(LineAttr(x1='0pt', y1='0pt', x2='100pt', y2='100pt', stroke='#1a73e8', stroke_width='2pt', line_cap='round'))L::line(new LineAttr(x1: '0pt', y1: '0pt', x2: '100pt', y2: '100pt', stroke: '#1a73e8', strokeWidth: '2pt', lineCap: 'round'))L.Line(new() { X1 = "0pt", Y1 = "0pt", X2 = "100pt", Y2 = "100pt", Stroke = "#1a73e8", StrokeWidth = "2pt", LineCap = "round" })