Difference between revisions of "PixelDisplay.fillPoly"
Jump to navigation
Jump to search
ZachStrout (talk | contribs) |
m (→Arguments) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
! Parameter Name !! Type !! Default Value !! Meaning | ! Parameter Name !! Type !! Default Value !! Meaning | ||
|- | |- | ||
− | | ''points'' || list || | + | | ''points'' || list || || list of three or more points |
|- | |- | ||
| ''color'' || color || self.color || color to draw | | ''color'' || color || self.color || color to draw | ||
− | |} | + | |} |
=== Usage Notes === | === Usage Notes === |
Latest revision as of 20:56, 23 April 2021
PixelDisplay.fillPoly
fills a polygon on the pixel display. The points argument can
be either a list of maps containing "x" and "y" values, or a list of 2-element
lists interpreted as [x, y].
Arguments
Parameter Name | Type | Default Value | Meaning |
---|---|---|---|
points | list | list of three or more points | |
color | color | self.color | color to draw |
Usage Notes
The polygon is automatically closed; there is no need to repeat the first point at the end of the list.
Example
gfx.fillPoly [[10,100], [200,500], [390,100]] // fills a triangle