This shows you the differences between two versions of the page.
en:poly [2016/11/07 12:18] admin |
en:poly [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Poly (Statement) ===== | ||
- | ==== Format ==== | ||
- | **poly** [[arrays|array[]]]\\ | ||
- | **poly** ( [[arrays|array[]]] )\\ | ||
- | **poly** [[Lists|{ x1, y1, x2, y2, x3, y3 ... }]]\\ | ||
- | **poly** [[Lists|{ {x1, y1}, {x2, y2}, {x3, y3} ... }]] | ||
- | ==== Description ==== | ||
- | Draws a polygon. | ||
- | |||
- | One dimensional arrays and lists must have at least six values and an even number of values. | ||
- | |||
- | ==== Example ==== | ||
- | < | ||
- | # using an array | ||
- | clg blue | ||
- | color green | ||
- | dim tri = {100, 100, 200, 200, 100, 200} | ||
- | poly tri[] | ||
- | </ | ||
- | < | ||
- | # using a list | ||
- | clg blue | ||
- | color green | ||
- | poly {{100, 100}, {200, 200}, {100, 200}} | ||
- | </ | ||
- | Both programs use the poly statement to draw the following: | ||
- | {{: | ||
- | |||
- | ==== See Also ==== | ||
- | {{page> | ||
- | |||
- | ==== History ==== | ||
- | |0.9.4|number of points in the array argument was removed from the poly statement| | ||
- | |1.99.99.55|two dimensional list support was added| | ||
- | |1.99.99.72|added required [] to passing variable array| |