Difference between revisions of "Image.setPixel"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
 (Created page with "<c>Image.setPixel</c> sets the color of a specific pixel in the image.   === Arguments ===  {| class="wikitable" |- ! Parameter Name !! Type !! Default Value !! Meaning |- | '...")  | 
				m  | 
				||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | <c>Image.setPixel</c> sets the color of a specific pixel in the image.    | + | <c>[[Image]].setPixel</c> sets the color of a specific pixel in the image.    | 
=== Arguments ===  | === Arguments ===  | ||
| Line 15: | Line 15: | ||
<ms>img = file.loadImage("/sys/pics/Dart.png")  | <ms>img = file.loadImage("/sys/pics/Dart.png")  | ||
| − | + | img.setPixel 5, 7, color.green</ms>  | |
[[Category:Mini Micro]]  | [[Category:Mini Micro]]  | ||
| + | [[Category:Soda]]  | ||
Latest revision as of 04:44, 19 August 2021
Image.setPixel sets the color of a specific pixel in the image. 
Arguments
| Parameter Name | Type | Default Value | Meaning | 
|---|---|---|---|
| x | number | 0 | horizontal coordinate of the pixel of interest, from 0 to width - 1 | 
| y | number | 0 | vertical coordinate of the pixel of interest, from 0 to height - 1 | 
Example
img = file.loadImage("/sys/pics/Dart.png")
img.setPixel 5, 7, color.green