From 6e8b552634cb5f5452e9c26ef557b60082f5f897 Mon Sep 17 00:00:00 2001 From: rxi Date: Mon, 26 Sep 2016 21:11:17 +0100 Subject: [PATCH] Updated doc/api.md for Image:setPixel/getPixel() --- doc/api.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api.md b/doc/api.md index 7784e0f..ac45471 100644 --- a/doc/api.md +++ b/doc/api.md @@ -214,11 +214,13 @@ Returns the height in pixels of the image. ##### Image:getPixel(x, y) Returns the color of the pixel at the position `x`, `y` of the image. If the -position is outside of the image then 0 is returned. +position is out of bounds or the pixel is set to transparent then `nil` is +returned. -##### Image:setPixel(x, y, color) -Sets the pixel of the image at the position `x`, `y` to `color`. If the -position is outside of the image then no change is made. +##### Image:setPixel(x, y [, red, green, blue]) +Sets the pixel of the image at position `x`, `y` to the given color; if no color +is provided the pixel is set to transparent. If the position is out of bounds +then no change is made. ### Quad