summaryrefslogtreecommitdiff
path: root/tests/typ/visualize
diff options
context:
space:
mode:
authorPg Biel <9021226+PgBiel@users.noreply.github.com>2023-04-23 09:38:12 -0300
committerGitHub <noreply@github.com>2023-04-23 14:38:12 +0200
commite9a0cf97419b3c7dac0ab74566a921ba255ead37 (patch)
treef0d6f044915ba4348f7fea1a91cd922af59552e8 /tests/typ/visualize
parentfd5e5b1ebb74b776f6e7f60998e239da5e6bbb61 (diff)
Fix 0pt strokes (#923)
Diffstat (limited to 'tests/typ/visualize')
-rw-r--r--tests/typ/visualize/stroke.typ33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/typ/visualize/stroke.typ b/tests/typ/visualize/stroke.typ
index 2443d27a..60733d78 100644
--- a/tests/typ/visualize/stroke.typ
+++ b/tests/typ/visualize/stroke.typ
@@ -69,3 +69,36 @@
// Error: 29-55 expected "solid", "dotted", "densely-dotted", "loosely-dotted", "dashed", "densely-dashed", "loosely-dashed", "dashdotted", "densely-dashdotted", "loosely-dashdotted", array, dictionary, dash pattern, or none
#line(length: 60pt, stroke: (color: red, dash: "dash"))
+
+---
+// 0pt strokes must function exactly like 'none' strokes and not draw anything
+#rect(width: 10pt, height: 10pt, stroke: none)
+#rect(width: 10pt, height: 10pt, stroke: 0pt)
+
+#rect(width: 10pt, height: 10pt, stroke: none, fill: blue)
+#rect(width: 10pt, height: 10pt, stroke: 0pt + red, fill: blue)
+
+#line(length: 30pt, stroke: 0pt)
+#line(length: 30pt, stroke: (color: red, thickness: 0pt, dash: ("dot", 1pt)))
+
+#table(columns: 2, stroke: none)[A][B]
+#table(columns: 2, stroke: 0pt)[A][B]
+
+#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: red,
+ stroke: 0pt,
+ closed: true,
+ ((0%, 0%), (4%, -4%)),
+ ((50%, 50%), (4%, -4%)),
+ ((0%, 50%), (4%, 4%)),
+ ((50%, 0%), (4%, 4%)),
+)