summaryrefslogtreecommitdiff
path: root/tests/typ/elements
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-11-23 12:45:20 +0100
committerLaurenz <laurmaedje@gmail.com>2021-11-23 12:45:20 +0100
commit4f9e5819bbab1f93ad4f4b789038c60487a76368 (patch)
tree488a4e0422db4531d9882cf08f0b5cc21ae55a23 /tests/typ/elements
parentd3f6040cedacad1b6c323be721c9086f6c5d9a44 (diff)
2d alignments with plus operator
Diffstat (limited to 'tests/typ/elements')
-rw-r--r--tests/typ/elements/circle.typ6
-rw-r--r--tests/typ/elements/ellipse.typ2
-rw-r--r--tests/typ/elements/image.typ2
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/typ/elements/circle.typ b/tests/typ/elements/circle.typ
index 9590ef7b..2e97e985 100644
--- a/tests/typ/elements/circle.typ
+++ b/tests/typ/elements/circle.typ
@@ -10,12 +10,12 @@
Auto-sized circle. \
#circle(fill: rgb("eb5278"), thickness: 2pt,
- align(center, horizon)[But, soft!]
+ align(center + horizon)[But, soft!]
)
Center-aligned rect in auto-sized circle.
#circle(fill: forest, stroke: conifer,
- align(center, horizon,
+ align(center + horizon,
rect(fill: conifer, pad(5pt)[But, soft!])
)
)
@@ -37,7 +37,7 @@ Expanded by height.
---
// Test relative sizing.
-#let centered(body) = align(center, horizon, body)
+#let centered(body) = align(center + horizon, body)
#font(fill: white)
#rect(width: 100pt, height: 50pt, fill: rgb("aaa"), centered[
#circle(radius: 10pt, fill: eastern, centered[A]) // D=20pt
diff --git a/tests/typ/elements/ellipse.typ b/tests/typ/elements/ellipse.typ
index 4f1d3187..47f6d0e1 100644
--- a/tests/typ/elements/ellipse.typ
+++ b/tests/typ/elements/ellipse.typ
@@ -9,7 +9,7 @@ Rect in ellipse in fixed rect. \
#rect(width: 3cm, height: 2cm, fill: rgb("2a631a"),
ellipse(fill: forest,
rect(fill: conifer,
- align(center, horizon)[
+ align(center + horizon)[
Stuff inside an ellipse!
]
)
diff --git a/tests/typ/elements/image.typ b/tests/typ/elements/image.typ
index 84260a28..9d192b40 100644
--- a/tests/typ/elements/image.typ
+++ b/tests/typ/elements/image.typ
@@ -21,7 +21,7 @@
#image("../../res/tiger.jpg", width: 100%, height: 20pt, fit: "stretch")
// Make sure the bounding-box of the image is correct.
-#align(bottom, right, image("../../res/tiger.jpg", width: 40pt))
+#align(bottom + right, image("../../res/tiger.jpg", width: 40pt))
---
// Test all three fit modes.