summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/layout/clip.pngbin25673 -> 29586 bytes
-rw-r--r--tests/typ/layout/clip.typ20
2 files changed, 17 insertions, 3 deletions
diff --git a/tests/ref/layout/clip.png b/tests/ref/layout/clip.png
index 53565a98..c847fc63 100644
--- a/tests/ref/layout/clip.png
+++ b/tests/ref/layout/clip.png
Binary files differ
diff --git a/tests/typ/layout/clip.typ b/tests/typ/layout/clip.typ
index 3baa8b80..d05fdb74 100644
--- a/tests/typ/layout/clip.typ
+++ b/tests/typ/layout/clip.typ
@@ -7,13 +7,13 @@ world 1
Space
-Hello #box(width: 1em, height: 1em, clip: true)[#rect(width: 3em, height: 3em, fill: red)]
+Hello #box(width: 1em, height: 1em, clip: true)[#rect(width: 3em, height: 3em, fill: red)]
world 2
---
// Test cliping text
#block(width: 5em, height: 2em, clip: false, stroke: 1pt + black)[
- But, soft! what light through
+ But, soft! what light through
]
#v(2em)
@@ -24,7 +24,7 @@ world 2
]
---
-// Test cliping svg glyphs
+// Test clipping svg glyphs
Emoji: #box(height: 0.5em, stroke: 1pt + black)[🐪, 🌋, 🏞]
Emoji: #box(height: 0.5em, clip: true, stroke: 1pt + black)[🐪, 🌋, 🏞]
@@ -40,3 +40,17 @@ First!
But, soft! what light through yonder window breaks? It is the east, and Juliet
is the sun.
]
+
+---
+// Test clipping with `radius`.
+
+#set page(height: 60pt)
+
+#box(
+ radius: 5pt,
+ stroke: 2pt + black,
+ width: 20pt,
+ height: 20pt,
+ clip: true,
+ image("/files/rhino.png", width: 30pt)
+)