diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 18:58:39 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 19:57:28 +0100 |
| commit | 3ffa7393f0632d9ee5dd9c821685a1a033d5c0ab (patch) | |
| tree | af09b0683352c4028436a2e5251dce54cf41d4aa /tests/typ/visualize/shape-circle.typ | |
| parent | f4856c18b9cf3f6952276cc61b557aebeb2fa651 (diff) | |
Make all nodes block-level
Diffstat (limited to 'tests/typ/visualize/shape-circle.typ')
| -rw-r--r-- | tests/typ/visualize/shape-circle.typ | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/typ/visualize/shape-circle.typ b/tests/typ/visualize/shape-circle.typ index 23c6fcbd..94facdeb 100644 --- a/tests/typ/visualize/shape-circle.typ +++ b/tests/typ/visualize/shape-circle.typ @@ -2,14 +2,14 @@ --- // Default circle. -#circle() -#circle[Hey] +#box(circle()) +#box(circle[Hey]) --- // Test auto sizing. #set circle(inset: 0pt) -Auto-sized circle. \ +Auto-sized circle. #circle(fill: rgb("eb5278"), stroke: 2pt + black, align(center + horizon)[But, soft!] ) @@ -21,7 +21,7 @@ Center-aligned rect in auto-sized circle. ) ) -Rect in auto-sized circle. \ +Rect in auto-sized circle. #circle(fill: forest, rect(fill: conifer, stroke: white, inset: 4pt)[ #set text(8pt) @@ -39,13 +39,18 @@ Expanded by height. --- // Test relative sizing. -#let centered(body) = align(center + horizon, body) #set text(fill: white) -#rect(width: 100pt, height: 50pt, inset: 0pt, fill: rgb("aaa"), centered[ - #circle(radius: 10pt, fill: eastern, centered[A]) // D=20pt - #circle(height: 60%, fill: eastern, centered[B]) // D=30pt - #circle(width: 20% + 20pt, fill: eastern, centered[C]) // D=40pt -]) +#show rect.with(width: 100pt, height: 50pt, inset: 0pt, fill: rgb("aaa")) +#set align(center + horizon) +#stack( + dir: ltr, + spacing: 1fr, + 1fr, + circle(radius: 10pt, fill: eastern, [A]), // D=20pt + circle(height: 60%, fill: eastern, [B]), // D=30pt + circle(width: 20% + 20pt, fill: eastern, [C]), // D=40pt + 1fr, +) --- // Radius wins over width and height. |
