From 7a6c2cce7747f7632f0be012f49b548db3e62a2d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 14 Jun 2022 15:07:13 +0200 Subject: Make radius configuration unconfusing --- tests/ref/graphics/shape-rect.png | Bin 16279 -> 16266 bytes tests/typ/graphics/shape-rect.typ | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/ref/graphics/shape-rect.png b/tests/ref/graphics/shape-rect.png index 2c2c7d7c..e2ea0502 100644 Binary files a/tests/ref/graphics/shape-rect.png and b/tests/ref/graphics/shape-rect.png differ diff --git a/tests/typ/graphics/shape-rect.typ b/tests/typ/graphics/shape-rect.typ index 5495da8c..7d110180 100644 --- a/tests/typ/graphics/shape-rect.typ +++ b/tests/typ/graphics/shape-rect.typ @@ -30,8 +30,13 @@ // Rounded corners. #rect(width: 2cm, radius: 60%) -#rect(width: 1cm, radius: (x: 5pt, y: 10pt)) -#rect(width: 1.25cm, radius: (left: 2pt, top: 5pt, right: 8pt, bottom: 11pt)) +#rect(width: 1cm, radius: (left: 10pt, right: 5pt)) +#rect(width: 1.25cm, radius: ( + top-left: 2pt, + top-right: 5pt, + bottom-right: 8pt, + bottom-left: 11pt +)) // Different strokes. [ @@ -54,3 +59,11 @@ Use the `*const T` pointer or the `&mut T` reference. --- // Error: 15-38 unexpected key "cake" #rect(radius: (left: 10pt, cake: 5pt)) + +--- +// Error: 15-21 expected stroke or none or dictionary with any of `left`, `top`, `right`, `bottom`, `x`, `y`, or `rest` as keys or auto, found array +#rect(stroke: (1, 2)) + +--- +// Error: 15-19 expected relative length or none or dictionary with any of `top-left`, `top-right`, `bottom-right`, `bottom-left`, `left`, `top`, `right`, `bottom`, or `rest` as keys, found color +#rect(radius: blue) -- cgit v1.2.3