diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/path.png | bin | 3150 -> 4364 bytes | |||
| -rw-r--r-- | tests/ref/polygon.png | bin | 3375 -> 3642 bytes | |||
| -rw-r--r-- | tests/suite/visualize/path.typ | 24 | ||||
| -rw-r--r-- | tests/suite/visualize/polygon.typ | 2 |
4 files changed, 24 insertions, 2 deletions
diff --git a/tests/ref/path.png b/tests/ref/path.png Binary files differindex 9643a476..5aa3b882 100644 --- a/tests/ref/path.png +++ b/tests/ref/path.png diff --git a/tests/ref/polygon.png b/tests/ref/polygon.png Binary files differindex 1dc11083..05090e1e 100644 --- a/tests/ref/polygon.png +++ b/tests/ref/polygon.png diff --git a/tests/suite/visualize/path.typ b/tests/suite/visualize/path.typ index bdd3dc72..95f7a803 100644 --- a/tests/suite/visualize/path.typ +++ b/tests/suite/visualize/path.typ @@ -1,10 +1,10 @@ // Test paths. --- path --- -#set page(height: 200pt, width: 200pt) +#set page(height: 300pt, width: 200pt) #table( columns: (1fr, 1fr), - rows: (1fr, 1fr), + rows: (1fr, 1fr, 1fr), align: center + horizon, path( fill: red, @@ -37,6 +37,26 @@ (30pt, 30pt), (15pt, 0pt), ), + path( + fill: red, + fill-rule: "non-zero", + closed: true, + (25pt, 0pt), + (10pt, 50pt), + (50pt, 20pt), + (0pt, 20pt), + (40pt, 50pt), + ), + path( + fill: red, + fill-rule: "even-odd", + closed: true, + (25pt, 0pt), + (10pt, 50pt), + (50pt, 20pt), + (0pt, 20pt), + (40pt, 50pt), + ), ) --- path-bad-vertex --- diff --git a/tests/suite/visualize/polygon.typ b/tests/suite/visualize/polygon.typ index a3f4c8ef..7d8342c8 100644 --- a/tests/suite/visualize/polygon.typ +++ b/tests/suite/visualize/polygon.typ @@ -27,6 +27,8 @@ // Self-intersections #polygon((0pt, 10pt), (30pt, 20pt), (0pt, 30pt), (20pt, 0pt), (20pt, 35pt)) +#polygon(fill-rule: "non-zero", (0pt, 10pt), (30pt, 20pt), (0pt, 30pt), (20pt, 0pt), (20pt, 35pt)) +#polygon(fill-rule: "even-odd", (0pt, 10pt), (30pt, 20pt), (0pt, 30pt), (20pt, 0pt), (20pt, 35pt)) // Regular polygon; should have equal side lengths #for k in range(3, 9) {polygon.regular(size: 30pt, vertices: k,)} |
