summaryrefslogtreecommitdiff
path: root/tests/suite/visualize/rect.typ
diff options
context:
space:
mode:
authorWannes Malfait <46323945+WannesMalfait@users.noreply.github.com>2025-06-23 16:58:04 +0200
committerGitHub <noreply@github.com>2025-06-23 14:58:04 +0000
commit38dd6da237b8d1ea86f82069338d9ceae479d180 (patch)
tree100d148c93667ff6e0e01691d91277602f205cb4 /tests/suite/visualize/rect.typ
parentbf8ef2a4a5ffa9c30fce9fc254ffcf982634e4c6 (diff)
Fix stroke cap of shapes with partial stroke (#5688)
Diffstat (limited to 'tests/suite/visualize/rect.typ')
-rw-r--r--tests/suite/visualize/rect.typ16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/suite/visualize/rect.typ b/tests/suite/visualize/rect.typ
index a659287e..ba5792b7 100644
--- a/tests/suite/visualize/rect.typ
+++ b/tests/suite/visualize/rect.typ
@@ -54,6 +54,22 @@
#v(3pt)
#rect(width: 20pt, height: 20pt, stroke: (thickness: 5pt, join: "round"))
+--- rect-stroke-caps ---
+// Separated segments
+#rect(width: 20pt, height: 20pt, stroke: (
+ left: (cap: "round", thickness: 5pt),
+ right: (cap: "square", thickness: 7pt),
+))
+// Joined segment with different caps.
+#rect(width: 20pt, height: 20pt, stroke: (
+ left: (cap: "round", thickness: 5pt),
+ top: (cap: "square", thickness: 7pt),
+))
+// No caps when there is a radius for that corner.
+#rect(width: 20pt, height: 20pt, radius: (top: 3pt), stroke: (
+ left: (cap: "round", thickness: 5pt),
+ top: (cap: "square", thickness: 7pt),
+))
--- red-stroke-bad-type ---
// Error: 15-21 expected length, color, gradient, tiling, dictionary, stroke, none, or auto, found array
#rect(stroke: (1, 2))