mirror of
https://github.com/typst/typst
synced 2025-08-26 04:34:14 +08:00
Add test
This commit is contained in:
parent
12a10576b6
commit
2ab644dc98
BIN
tests/ref/rect-stroke-caps.png
Normal file
BIN
tests/ref/rect-stroke-caps.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 252 B |
@ -54,6 +54,22 @@
|
|||||||
#v(3pt)
|
#v(3pt)
|
||||||
#rect(width: 20pt, height: 20pt, stroke: (thickness: 5pt, join: "round"))
|
#rect(width: 20pt, height: 20pt, stroke: (thickness: 5pt, join: "round"))
|
||||||
|
|
||||||
|
--- rect-stroke-caps ---
|
||||||
|
// Separated segments
|
||||||
|
#rect(width: 20pt, height: 20pt, stroke: (
|
||||||
|
left: (cap: "round", thickness: 5pt),
|
||||||
|
right: (cap: "square", thickness: 7pt),
|
||||||
|
))
|
||||||
|
// Joined segment with different caps.
|
||||||
|
#rect(width: 20pt, height: 20pt, stroke: (
|
||||||
|
left: (cap: "round", thickness: 5pt),
|
||||||
|
top: (cap: "square", thickness: 7pt),
|
||||||
|
))
|
||||||
|
// No caps when there is a radius for that corner.
|
||||||
|
#rect(width: 20pt, height: 20pt, radius: (top: 3pt), stroke: (
|
||||||
|
left: (cap: "round", thickness: 5pt),
|
||||||
|
top: (cap: "square", thickness: 7pt),
|
||||||
|
))
|
||||||
--- red-stroke-bad-type ---
|
--- red-stroke-bad-type ---
|
||||||
// Error: 15-21 expected length, color, gradient, tiling, dictionary, stroke, none, or auto, found array
|
// Error: 15-21 expected length, color, gradient, tiling, dictionary, stroke, none, or auto, found array
|
||||||
#rect(stroke: (1, 2))
|
#rect(stroke: (1, 2))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user