Difference between revisions of "Paintutils.drawPixel"

From ComputerCraft Wiki
Jump to: navigation, search
m (Int -> {{type|number}})
(Changing int to number)
Line 2: Line 2:
 
{{Function
 
{{Function
 
  |name=paintutils.drawPixel
 
  |name=paintutils.drawPixel
  |args=[[int (type)|int]] x, {{type|number}} y, {{type|number}} colour
+
  |args={{type|number}} x, {{type|number}} y, {{type|number}} [[color (API)|color]]
 
  |api=paintutils
 
  |api=paintutils
 
  |returns=nil
 
  |returns=nil
Line 10: Line 10:
 
{{Example
 
{{Example
 
|desc=This code will draw a red pixel at the position (10, 8)
 
|desc=This code will draw a red pixel at the position (10, 8)
|code=image = [[paintutils.drawPixel]](10, 8, [[colour (API)|colours]].red)
+
|code=image = [[paintutils.drawPixel]](10, 8, [[color (API)|colors]].red)
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:API_Functions]]
 
[[Category:API_Functions]]

Revision as of 13:43, 18 July 2013


Grid Redstone.png  Function paintutils.drawPixel
Draw a pixel on the screen
Syntax paintutils.drawPixel(number x, number y, number color)
Returns nil
Part of ComputerCraft
API paintutils

Examples

Grid paper.png  Example
This code will draw a red pixel at the position (10, 8)
Code
image = paintutils.drawPixel(10, 8, colors.red)