summaryrefslogtreecommitdiff
path: root/tests/suite/visualize/pattern.typ
diff options
context:
space:
mode:
authorEric Biedert <github@ericbiedert.de>2024-08-05 12:24:22 +0200
committerGitHub <noreply@github.com>2024-08-05 10:24:22 +0000
commited247797ac17e0975d6663d65b0976ab92130d80 (patch)
tree32e957ed0ce6da03a780fee0952452a8322d5cce /tests/suite/visualize/pattern.typ
parentdfdcc197c019b4ca5bc09487ee5f36030704b334 (diff)
Fix alignment of gradients and patterns on strokes in PNG (#4634)
Diffstat (limited to 'tests/suite/visualize/pattern.typ')
-rw-r--r--tests/suite/visualize/pattern.typ24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/suite/visualize/pattern.typ b/tests/suite/visualize/pattern.typ
index b0c92efa..b87b7755 100644
--- a/tests/suite/visualize/pattern.typ
+++ b/tests/suite/visualize/pattern.typ
@@ -101,13 +101,35 @@
center + top,
square(
size: 50pt,
- stroke: 5pt + pattern(
+ fill: pattern(
size: (5pt, 5pt),
align(horizon + center, circle(fill: blue, radius: 2.5pt))
+ ),
+ stroke: 7.5pt + pattern(
+ size: (5pt, 5pt),
+ align(horizon + center, circle(fill: red, radius: 2.5pt))
)
)
)
+--- pattern-stroke-relative-parent ---
+// Test pattern on strokes with relative set to `"parent"`
+// The pattern on the circle should align with the pattern on the square.
+#align(
+ center + top,
+ block(
+ width: 50pt,
+ height: 50pt,
+ fill: pattern(size: (5pt, 5pt), circle(radius: 2.5pt, fill: blue)),
+ align(center + horizon, circle(
+ radius: 15pt,
+ stroke: 7.5pt + pattern(
+ size: (5pt, 5pt), circle(radius: 2.5pt, fill: red), relative: "parent"
+ ),
+ ))
+ )
+)
+
--- pattern-text ---
// Test a pattern on some text
// You shouldn't be able to see the text, if you can then