Difference between revisions of "Paintutils.drawPixel"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m (Expanded) |
Bomb Bloke (Talk | contribs) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=paintutils.drawPixel | |name=paintutils.drawPixel | ||
− | |args={{type|number}} x, {{type|number}} y | + | |args={{type|number}} x, {{type|number}} y, {{type|number}} [[color (API)|color]] |
|api=paintutils | |api=paintutils | ||
|returns=None | |returns=None | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Draw a pixel on the screen at ''x'' and ''y'' | + | |desc=Draw a pixel on the screen at ''x'' and ''y'', with color ''color''. Note that the cursor will be moved and background color will be changed by this function.<br><br> |
+ | |||
+ | In builds prior to ComputerCraft 1.6, the color parameter is optional - if omitted, the current background color will be used instead. | ||
|examples= | |examples= | ||
{{Example | {{Example |
Latest revision as of 05:57, 28 April 2014
Function paintutils.drawPixel | |
Draw a pixel on the screen at x and y, with color color. Note that the cursor will be moved and background color will be changed by this function. In builds prior to ComputerCraft 1.6, the color parameter is optional - if omitted, the current background color will be used instead. | |
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) |