summaryrefslogtreecommitdiff
path: root/tests/typ/visualize/pattern-text.typ
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2023-11-24 15:46:20 +0100
committerGitHub <noreply@github.com>2023-11-24 15:46:20 +0100
commit1756718bab3055597723a9b433419ff07e6b7f02 (patch)
treea06a7a381c994d762c298ec66903db0718877806 /tests/typ/visualize/pattern-text.typ
parent3d2f1d2d6cc34fa64c56abd335dd14ea4c932a6c (diff)
Gradient Part 6 - Pattern fills (#2740)
Diffstat (limited to 'tests/typ/visualize/pattern-text.typ')
-rw-r--r--tests/typ/visualize/pattern-text.typ28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/typ/visualize/pattern-text.typ b/tests/typ/visualize/pattern-text.typ
new file mode 100644
index 00000000..a9fbfb37
--- /dev/null
+++ b/tests/typ/visualize/pattern-text.typ
@@ -0,0 +1,28 @@
+// Test a pattern on some text
+
+---
+// You shouldn't be able to see the text, if you can then
+// that means that the transform matrices are not being
+// applied to the text correctly.
+#let pat = pattern(
+ size: (30pt, 30pt),
+ relative: "parent",
+ square(size: 30pt, fill: gradient.conic(..color.map.rainbow))
+);
+
+#set page(
+ width: 140pt,
+ height: 140pt,
+ fill: pat
+)
+
+#rotate(45deg, scale(x: 50%, y: 70%, rect(
+ width: 100%,
+ height: 100%,
+ stroke: 1pt,
+)[
+ #lorem(10)
+
+ #set text(fill: pat)
+ #lorem(10)
+]))