This shows you the differences between two versions of the page.
en:poly [2016/01/01 22:41] 127.0.0.1 external edit |
en:poly [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Poly (Statement) ===== | ||
- | ==== Format ==== | ||
- | **poly** // | ||
- | **poly** ( // | ||
- | **poly** { x1, y1, x2, y2, x3, y3 ... } | ||
- | ==== Description ==== | ||
- | Draws a polygon. | ||
- | |||
- | ==== Example ==== | ||
- | < | ||
- | # using an array | ||
- | color blue | ||
- | rect 0,0,300,300 | ||
- | color green | ||
- | dim tri(1) | ||
- | tri = {100, 100, 200, 200, 100, 200} | ||
- | poly tri | ||
- | </ | ||
- | < | ||
- | # using an anonymous array | ||
- | color blue | ||
- | rect 0,0,300,300 | ||
- | 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| |