summaryrefslogtreecommitdiff
path: root/tests/typ/visualize/path.typ
diff options
context:
space:
mode:
authorSekoiaTree <51149447+SekoiaTree@users.noreply.github.com>2023-04-06 12:10:49 +0200
committerGitHub <noreply@github.com>2023-04-06 12:10:49 +0200
commit52b92a9d352a47421e83649ece585882053a4ec7 (patch)
tree2619f52b1d27bd15b788fd082492ddcdbed466dd /tests/typ/visualize/path.typ
parent085282c138899dd5aaa06bc6ae7bd2f79d75d7e1 (diff)
Path support (#536)
Diffstat (limited to 'tests/typ/visualize/path.typ')
-rw-r--r--tests/typ/visualize/path.typ44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/typ/visualize/path.typ b/tests/typ/visualize/path.typ
new file mode 100644
index 00000000..7a260eb8
--- /dev/null
+++ b/tests/typ/visualize/path.typ
@@ -0,0 +1,44 @@
+// Test paths.
+
+---
+#set page(height: 200pt, width: 200pt)
+#table(
+ columns: (1fr, 1fr),
+ rows: (1fr, 1fr),
+ align: center + horizon,
+ path(
+ fill: red,
+ stroke: none,
+ closed: true,
+ ((0%, 0%), (4%, -4%)),
+ ((50%, 50%), (4%, -4%)),
+ ((0%, 50%), (4%, 4%)),
+ ((50%, 0%), (4%, 4%)),
+ ),
+ path(
+ fill: purple,
+ (0pt, 0pt),
+ (30pt, 30pt),
+ (0pt, 30pt),
+ (30pt, 0pt),
+ ),
+ path(
+ fill: blue,
+ closed: true,
+ ((30%, 0%), (35%, 30%), (-20%, 0%)),
+ ((30%, 60%), (-20%, 0%), (0%, 0%)),
+ ((50%, 30%), (60%, -30%), (60%, 0%)),
+ ),
+)
+
+---
+// Error: 7-9 path vertex must have 1, 2, or 3 points
+#path(())
+
+---
+// Error: 7-47 path vertex must have 1, 2, or 3 points
+#path(((0%, 0%), (0%, 0%), (0%, 0%), (0%, 0%)))
+
+---
+// Error: 7-31 point array must contain exactly two entries
+#path(((0%, 0%), (0%, 0%, 0%)))