Difference between revisions of "PixelDisplay.fillPoly"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
ZachStrout (talk | contribs)  (Created page with "<c>PixelDisplay.fillPoly</c> 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-elem...")  | 
				ZachStrout (talk | contribs)   | 
				||
| Line 1: | Line 1: | ||
| − | <c>[[PixelDisplay  | + | <c>[[PixelDisplay]].fillPoly</c> 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  | be either a list of maps containing "x" and "y" values, or a list of 2-element  | ||
lists interpreted as [''x'', ''y''].  | lists interpreted as [''x'', ''y''].  | ||
Revision as of 00:11, 29 April 2020
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 | default value | 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