-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff59d3e
commit 3d765af
Showing
8 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#set page(height: 300pt, width: 200pt) | ||
#table( | ||
columns: (1fr, 1fr), | ||
rows: (1fr, 1fr, 1fr), | ||
align: center + horizon, | ||
path( | ||
fill: red, | ||
closed: true, | ||
((0%, 0%), (4%, -4%)), | ||
((50%, 50%), (4%, -4%)), | ||
((0%, 50%), (4%, 4%)), | ||
((50%, 0%), (4%, 4%)), | ||
), | ||
path( | ||
fill: purple, | ||
stroke: 1pt, | ||
(0pt, 0pt), | ||
(30pt, 30pt), | ||
(0pt, 30pt), | ||
(30pt, 0pt), | ||
), | ||
|
||
path( | ||
fill: blue, | ||
stroke: 1pt, | ||
closed: true, | ||
((30%, 0%), (35%, 30%), (-20%, 0%)), | ||
((30%, 60%), (-20%, 0%), (0%, 0%)), | ||
((50%, 30%), (60%, -30%), (60%, 0%)), | ||
), | ||
path( | ||
stroke: 5pt, | ||
closed: true, | ||
(0pt, 30pt), | ||
(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), | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
#import "/contrib/templates/std-tests/preset.typ": * | ||
#show: test-page | ||
|
||
#set page(width: 50pt) | ||
#set polygon(stroke: 0.75pt, fill: blue) | ||
|
||
// These are not visible, but should also not give an error | ||
#polygon() | ||
#polygon((0em, 0pt)) | ||
#polygon((0pt, 0pt), (10pt, 0pt)) | ||
#polygon.regular(size: 0pt, vertices: 9) | ||
|
||
#polygon((5pt, 0pt), (0pt, 10pt), (10pt, 10pt)) | ||
#polygon( | ||
(0pt, 0pt), | ||
(5pt, 5pt), | ||
(10pt, 0pt), | ||
(15pt, 5pt), | ||
(5pt, 10pt), | ||
) | ||
#polygon(stroke: none, (5pt, 0pt), (0pt, 10pt), (10pt, 10pt)) | ||
#polygon(stroke: 3pt, fill: none, (5pt, 0pt), (0pt, 10pt), (10pt, 10pt)) | ||
|
||
// Relative size | ||
#polygon((0pt, 0pt), (100%, 5pt), (50%, 10pt)) | ||
|
||
// Antiparallelogram | ||
#polygon((0pt, 5pt), (5pt, 0pt), (0pt, 10pt), (5pt, 15pt)) | ||
|
||
// 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) | ||
} |