diff options
Diffstat (limited to 'tests/typ/graphics/shape-rect.typ')
| -rw-r--r-- | tests/typ/graphics/shape-rect.typ | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/typ/graphics/shape-rect.typ b/tests/typ/graphics/shape-rect.typ index 52fe03ea..3d157675 100644 --- a/tests/typ/graphics/shape-rect.typ +++ b/tests/typ/graphics/shape-rect.typ @@ -27,3 +27,30 @@ \{#rect(width: 0.5in, height: 7pt, fill: rgb("d6cd67")) #rect(width: 0.5in, height: 7pt, fill: rgb("edd466")) #rect(width: 0.5in, height: 7pt, fill: rgb("e3be62"))\} + +// 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)) + +// Different strokes. +[ + #set rect(stroke: (right: red,)) + #rect(width: 100%, fill: lime, stroke: (x: 5pt, y: 1pt)) +] + +--- +// Outset padding. +#let inline-code(body) = [ + #set text("IBM Plex Mono", 8pt) + #h(.7em, weak: true) + #rect(radius: 3pt, outset: (y: 3pt, x: 2.5pt), fill: rgb(239, 241, 243), body) + #h(.7em, weak: true) +] + +Use the #inline-code[\*const ptr] pointer. + +--- +// Error: 15-38 unexpected key "cake" +#rect(radius: (left: 10pt, cake: 5pt)) + |
