diff options
| author | Pg Biel <9021226+PgBiel@users.noreply.github.com> | 2023-04-23 09:38:12 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-23 14:38:12 +0200 |
| commit | e9a0cf97419b3c7dac0ab74566a921ba255ead37 (patch) | |
| tree | f0d6f044915ba4348f7fea1a91cd922af59552e8 /tests | |
| parent | fd5e5b1ebb74b776f6e7f60998e239da5e6bbb61 (diff) | |
Fix 0pt strokes (#923)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/visualize/stroke.png | bin | 14835 -> 4382 bytes | |||
| -rw-r--r-- | tests/typ/visualize/stroke.typ | 33 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/ref/visualize/stroke.png b/tests/ref/visualize/stroke.png Binary files differindex 312eabec..1c887070 100644 --- a/tests/ref/visualize/stroke.png +++ b/tests/ref/visualize/stroke.png diff --git a/tests/typ/visualize/stroke.typ b/tests/typ/visualize/stroke.typ index 2443d27a..60733d78 100644 --- a/tests/typ/visualize/stroke.typ +++ b/tests/typ/visualize/stroke.typ @@ -69,3 +69,36 @@ // Error: 29-55 expected "solid", "dotted", "densely-dotted", "loosely-dotted", "dashed", "densely-dashed", "loosely-dashed", "dashdotted", "densely-dashdotted", "loosely-dashdotted", array, dictionary, dash pattern, or none #line(length: 60pt, stroke: (color: red, dash: "dash")) + +--- +// 0pt strokes must function exactly like 'none' strokes and not draw anything +#rect(width: 10pt, height: 10pt, stroke: none) +#rect(width: 10pt, height: 10pt, stroke: 0pt) + +#rect(width: 10pt, height: 10pt, stroke: none, fill: blue) +#rect(width: 10pt, height: 10pt, stroke: 0pt + red, fill: blue) + +#line(length: 30pt, stroke: 0pt) +#line(length: 30pt, stroke: (color: red, thickness: 0pt, dash: ("dot", 1pt))) + +#table(columns: 2, stroke: none)[A][B] +#table(columns: 2, stroke: 0pt)[A][B] + +#path( + fill: red, + stroke: none, + closed: true, + ((0%, 0%), (4%, -4%)), + ((50%, 50%), (4%, -4%)), + ((0%, 50%), (4%, 4%)), + ((50%, 0%), (4%, 4%)), +) +#path( + fill: red, + stroke: 0pt, + closed: true, + ((0%, 0%), (4%, -4%)), + ((50%, 50%), (4%, -4%)), + ((0%, 50%), (4%, 4%)), + ((50%, 0%), (4%, 4%)), +) |
