Difference between revisions of "Paintutils.drawPixel"
From ComputerCraft Wiki
(Removed code implying it had a return value) |
MKlegoman357 (Talk | contribs) m (Expanded) |
||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
{{Function | {{Function | ||
− | + | |name=paintutils.drawPixel | |
− | + | |args={{type|number}} x, {{type|number}} y [<nowiki/>, {{type|number}} [[color (API)|color]]] | |
− | + | |api=paintutils | |
− | + | |returns=None | |
− | + | |addon=ComputerCraft | |
− | + | |desc=Draw a pixel on the screen at ''x'' and ''y''. If ''color'' is specified then draws the pixel using that color, otherwise uses last color set by [[term.setBackgroundColor]]. Note that it doesn't reset the background color. | |
− | + | |examples= | |
{{Example | {{Example | ||
− | |desc= | + | |desc=Draws a red pixel at the position (10, 8). |
− | |code= | + | |code='''paintutils.drawPixel(10, 8, [[color (API)|colors]].red)''' |
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] |
Revision as of 16:05, 10 April 2014
Function paintutils.drawPixel | |
Draw a pixel on the screen at x and y. If color is specified then draws the pixel using that color, otherwise uses last color set by term.setBackgroundColor. Note that it doesn't reset the background color. | |
Syntax | paintutils.drawPixel(number x, number y [, number color]) |
Returns | None |
Part of | ComputerCraft |
API | paintutils |
Examples
Example | |
Draws a red pixel at the position (10, 8). | |
Code |
paintutils.drawPixel(10, 8, colors.red) |