This shows you the differences between two versions of the page.
pt:poly [2016/01/01 22:48] |
pt:poly [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Poly ===== | ||
+ | ==== Formato ==== | ||
+ | **poly** //numeric array variable// | ||
+ | **poly** {x1, y1, x2, y2, x3, y3 ...} | ||
+ | ==== Description ==== | ||
+ | Desenha um poligono. | ||
+ | |||
+ | ==== Nota ==== | ||
+ | O número de pontos no argumento do array foi removido da declaração poly na versão 0.9.4. | ||
+ | |||
+ | ==== Ver também ==== | ||
+ | [[stamp|Stamp]] | ||
+ | ==== Exemplo ==== | ||
+ | < | ||
+ | # using an array | ||
+ | color blue | ||
+ | rect 0,0,300,300 | ||
+ | color green | ||
+ | dim tri(1) | ||
+ | tri = {100, 100, 200, 200, 100, 200} | ||
+ | poly tri | ||
+ | </ | ||
+ | < | ||
+ | # usando um array anónimo | ||
+ | color blue | ||
+ | rect 0,0,300,300 | ||
+ | color green | ||
+ | poly {100, 100, 200, 200, 100, 200} | ||
+ | </ | ||
+ | Ambos os programas fazem o mesmo:\\ | ||
+ | {{: |