Line 1: |
Line 1: |
− | <p><b>fillPolygon</b> is a function that is part of <a href=":Category:gc">gc</a>. | + | <p><b>fillPolygon</b> is a function that is part of [[:Category:gc|gc]]. |
− | </p><p>Fills the polygon defined by the lines connecting the (x,y) points. The polygon is not automatically closed; the first x-y coordinate pair must be repeated at the end of the array of points to draw a closed polygon. | + | </p><p>Fills the polygon defined by the lines connecting the (x,y) points. |
− | </p><p><br /> <span class="fck_mw_template">{{Since|3.0}}</span> | + | |
| + | The polygon is not automatically closed; the first x-y coordinate pair must be repeated at the end of the array of points to draw a closed polygon. |
| + | </p><p><br /> {{Since|3.0}} |
| </p> | | </p> |
| <h2>Syntax</h2> | | <h2>Syntax</h2> |
Line 28: |
Line 30: |
| </table> | | </table> |
| <h2> Example </h2> | | <h2> Example </h2> |
− | <div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="lua source-lua"><pre class="de1"><span class="kw2">gc:fillPolygon</span><span class="br0">(</span><span class="br0">{</span><span class="nu0">0</span>,<span class="nu0">0</span>, <span class="nu0">0</span>,<span class="nu0">100</span>, <span class="nu0">100</span>,<span class="nu0">100</span>, <span class="nu0">100</span>,<span class="nu0">0</span>, <span class="nu0">0</span>,<span class="nu0">0</span><span class="br0">}</span><span class="br0">)</span></pre></div></div> | + | |
− | <p><br />
| + | <syntaxhighlight>gc:fillPolygon({0,0, 0,100, 100,100, 100,0, 0,0}) </syntaxhighlight> |
− | This draws a filled-recatngle (square, actually) whose points are at the given coordinates. | + | |
− | </p><p><br /><br />
| + | This draws a filled-rectangle (square, actually) whose points are at the given coordinates. |
− | </p><a _fcknotitle="true" href="Category:gc">gc</a>
| + | <br /><br /> |
| + | [[Category:gc]] |