summaryrefslogtreecommitdiff
path: root/tests/typ/visualize/shape-rounded.typ
diff options
context:
space:
mode:
authorAnton Wetzel <59712243+antonWetzel@users.noreply.github.com>2023-09-25 13:54:58 +0200
committerGitHub <noreply@github.com>2023-09-25 13:54:58 +0200
commit98e5d9750923fa05ff2ab39a55e3b48ddd5b9ed8 (patch)
tree90c85096fa314b5739dffded8d55bf1a38664863 /tests/typ/visualize/shape-rounded.typ
parent44bbfded5fb270a0b6c38b1d4dc8923dc44d7e7e (diff)
Better rect edges (#1956)
Diffstat (limited to 'tests/typ/visualize/shape-rounded.typ')
-rw-r--r--tests/typ/visualize/shape-rounded.typ53
1 files changed, 50 insertions, 3 deletions
diff --git a/tests/typ/visualize/shape-rounded.typ b/tests/typ/visualize/shape-rounded.typ
index 862141ba..42432dc9 100644
--- a/tests/typ/visualize/shape-rounded.typ
+++ b/tests/typ/visualize/shape-rounded.typ
@@ -1,6 +1,53 @@
// Test rounded rectangles and squares.
---
-// Ensure that radius is clamped.
-#rect(radius: -20pt)
-#square(radius: 30pt)
+#set square(size: 20pt, stroke: 4pt)
+
+// no radius for non-rounded corners
+#stack(
+ dir: ltr,
+ square(),
+ h(10pt),
+ square(radius: 0pt),
+ h(10pt),
+ square(radius: -10pt),
+)
+
+#stack(
+ dir: ltr,
+ square(),
+ h(10pt),
+ square(radius: 0%),
+ h(10pt),
+ square(radius: -10%),
+)
+
+
+// small values for small radius
+#stack(
+ dir: ltr,
+ square(radius: 1pt),
+ h(10pt),
+ square(radius: 5%),
+ h(10pt),
+ square(radius: 2pt),
+)
+
+// large values for large radius or circle
+#stack(
+ dir: ltr,
+ square(radius: 8pt),
+ h(10pt),
+ square(radius: 10pt),
+ h(10pt),
+ square(radius: 12pt),
+)
+
+#stack(
+ dir: ltr,
+ square(radius: 45%),
+ h(10pt),
+ square(radius: 50%),
+ h(10pt),
+ square(radius: 55%),
+)