diff options
| author | Wannes Malfait <46323945+WannesMalfait@users.noreply.github.com> | 2025-06-23 16:58:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-23 14:58:04 +0000 |
| commit | 38dd6da237b8d1ea86f82069338d9ceae479d180 (patch) | |
| tree | 100d148c93667ff6e0e01691d91277602f205cb4 /tests | |
| parent | bf8ef2a4a5ffa9c30fce9fc254ffcf982634e4c6 (diff) | |
Fix stroke cap of shapes with partial stroke (#5688)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/rect-stroke-caps.png | bin | 0 -> 252 bytes | |||
| -rw-r--r-- | tests/suite/visualize/rect.typ | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/ref/rect-stroke-caps.png b/tests/ref/rect-stroke-caps.png Binary files differnew file mode 100644 index 00000000..13a34ad9 --- /dev/null +++ b/tests/ref/rect-stroke-caps.png diff --git a/tests/suite/visualize/rect.typ b/tests/suite/visualize/rect.typ index a659287e..ba5792b7 100644 --- a/tests/suite/visualize/rect.typ +++ b/tests/suite/visualize/rect.typ @@ -54,6 +54,22 @@ #v(3pt) #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 --- // Error: 15-21 expected length, color, gradient, tiling, dictionary, stroke, none, or auto, found array #rect(stroke: (1, 2)) |
