summaryrefslogtreecommitdiff
path: root/tests/library
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2021-02-04 21:30:18 +0100
committerMartin Haug <mhaug@live.de>2021-02-04 21:30:18 +0100
commit8469bad7487e111c8e5a0ec542f0232a0ebb4bdc (patch)
tree6d2781a8c6e95a10de048d39f5bd6ebaa82bc6ea /tests/library
parentdacd7dadc04d4538f1063a86afd676695c7471ab (diff)
Add rectangle function 🎛
Diffstat (limited to 'tests/library')
-rw-r--r--tests/library/ref/geom.pngbin0 -> 5087 bytes
-rw-r--r--tests/library/typ/geom.typ23
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/library/ref/geom.png b/tests/library/ref/geom.png
new file mode 100644
index 00000000..37fd7d27
--- /dev/null
+++ b/tests/library/ref/geom.png
Binary files differ
diff --git a/tests/library/typ/geom.typ b/tests/library/typ/geom.typ
new file mode 100644
index 00000000..26ba7ca3
--- /dev/null
+++ b/tests/library/typ/geom.typ
@@ -0,0 +1,23 @@
+#[page "a5", flip: true]
+
+// Rectangle with width, should have paragraph height
+#[rect width: 2cm, color: #9650D6][aa]
+
+Sometimes there is no box
+
+// Rectangle with height, should span line
+#[rect height: 2cm, color: #734CED][bb]
+
+// Empty rectangle with width and height
+#[rect width: 6cm, height: 12pt, color: #CB4CED]
+
+// This empty rectangle should not be displayed
+#[rect width: 2in, color: #ff0000]
+
+// This one should be
+#[rect height: 15mm, color: #494DE3]
+
+// These are in a row!
+#[rect width: 2in, height: 10pt, color: #D6CD67]
+#[rect width: 2in, height: 10pt, color: #EDD466]
+#[rect width: 2in, height: 10pt, color: #E3BE62]