summaryrefslogtreecommitdiff
path: root/tests/typ/elements/rect.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-05 18:51:21 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-05 18:51:21 +0200
commitdcdcf53831aa477b575c9e6ab37eb64f14317c74 (patch)
tree43b742ddbcb623254d8d6e6e65d2c432cb7509e8 /tests/typ/elements/rect.typ
parent5e06941c63425ab10e08e4d533939c7309cfe6ce (diff)
Rename insert/ to elements/
Diffstat (limited to 'tests/typ/elements/rect.typ')
-rw-r--r--tests/typ/elements/rect.typ27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/typ/elements/rect.typ b/tests/typ/elements/rect.typ
new file mode 100644
index 00000000..4824095a
--- /dev/null
+++ b/tests/typ/elements/rect.typ
@@ -0,0 +1,27 @@
+// Test shapes.
+
+---
+// Test the `rect` function.
+
+#page(width: 150pt)
+
+// Fit to text.
+#rect(fill: conifer)[Textbox]
+
+// Empty with fixed width and height.
+#rect(width: 3cm, height: 12pt, fill: rgb("CB4CED"))
+
+// Fixed width, text height.
+#rect(width: 2cm, fill: rgb("9650D6"), pad(5pt)[Fixed and padded])
+
+// Page width, fixed height.
+#rect(height: 1cm, width: 100%, fill: rgb("734CED"))[Topleft]
+
+// Not visible, but creates a gap between the boxes above and below
+// due to line spacing.
+#rect(width: 1in, fill: rgb("ff0000"))
+
+// These are in a row!
+#rect(width: 0.5in, height: 10pt, fill: rgb("D6CD67"))
+#rect(width: 0.5in, height: 10pt, fill: rgb("EDD466"))
+#rect(width: 0.5in, height: 10pt, fill: rgb("E3BE62"))