diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 15:01:40 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 15:01:40 +0100 |
| commit | 6260878245bdf81d7b928777e4fc1018c6651878 (patch) | |
| tree | 39ba46240093e17f51ced2b2125411c94b69f884 /tests/typ/visualize | |
| parent | 2b26e0812877b5a42b62c4bfc8b63a8e61283bff (diff) | |
Let line have an extent
Diffstat (limited to 'tests/typ/visualize')
| -rw-r--r-- | tests/typ/visualize/line.typ | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/typ/visualize/line.typ b/tests/typ/visualize/line.typ index 2085daa1..a7bca613 100644 --- a/tests/typ/visualize/line.typ +++ b/tests/typ/visualize/line.typ @@ -1,17 +1,16 @@ -// Test lines +// Test lines. --- -// Default line. -#line() +#set page(height: 60pt) +#box({ + set line(stroke: 0.75pt) + place(line(end: (0.4em, 0pt))) + place(line(start: (0pt, 0.4em), end: (0pt, 0pt))) + line(end: (0.6em, 0.6em)) +}) +Hello #line()! ---- -// Test the `end` argument. -#{ - line(end: (10pt, 0pt)) - line(start: (0pt, 10pt), end: (0pt, 0pt)) - line(end: (15pt, 15pt)) -} -#v(.5cm) +#line(end: (70%, 50%)) --- // Test the angle argument and positioning. @@ -19,20 +18,21 @@ #set page(fill: rgb("0B1026")) #set line(stroke: white) -#let star(width, ..args) = box(width: width, height: width)[ +#let star(size, ..args) = box(width: size, height: size)[ #set text(spacing: 0%) #set line(..args) #set align(left) - #line(length: +30%, start: (09.0%, 02%)) - #line(length: +30%, start: (38.7%, 02%), angle: -72deg) - #line(length: +30%, start: (57.5%, 02%), angle: 252deg) - #line(length: +30%, start: (57.3%, 02%)) - #line(length: -30%, start: (88.0%, 02%), angle: -36deg) - #line(length: +30%, start: (73.3%, 48%), angle: 252deg) - #line(length: -30%, start: (73.5%, 48%), angle: 36deg) - #line(length: +30%, start: (25.4%, 48%), angle: -36deg) - #line(length: +30%, start: (25.6%, 48%), angle: -72deg) - #line(length: +32%, start: (8.50%, 02%), angle: 34deg) + #v(30%) + #place(line(length: +30%, start: (09.0%, 02%))) + #place(line(length: +30%, start: (38.7%, 02%), angle: -72deg)) + #place(line(length: +30%, start: (57.5%, 02%), angle: 252deg)) + #place(line(length: +30%, start: (57.3%, 02%))) + #place(line(length: -30%, start: (88.0%, 02%), angle: -36deg)) + #place(line(length: +30%, start: (73.3%, 48%), angle: 252deg)) + #place(line(length: -30%, start: (73.5%, 48%), angle: 36deg)) + #place(line(length: +30%, start: (25.4%, 48%), angle: -36deg)) + #place(line(length: +30%, start: (25.6%, 48%), angle: -72deg)) + #place(line(length: +32%, start: (8.50%, 02%), angle: 34deg)) ] #align(center, grid( |
