summaryrefslogtreecommitdiff
path: root/meta/3rd/love2d/library/love.image.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-25 16:44:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-25 16:44:08 +0800
commit8ced2703cc4598fe880cf27f2f82a90e947b532f (patch)
tree0e4c8e0de8128d5fcccb217581a907170256d01a /meta/3rd/love2d/library/love.image.lua
parent916bec18c8384f14404b2b79d762855d1610411a (diff)
downloadlua-language-server-8ced2703cc4598fe880cf27f2f82a90e947b532f.zip
update love2d-api
Diffstat (limited to 'meta/3rd/love2d/library/love.image.lua')
-rw-r--r--meta/3rd/love2d/library/love.image.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua
index 65badbc1..9dc9c6e7 100644
--- a/meta/3rd/love2d/library/love.image.lua
+++ b/meta/3rd/love2d/library/love.image.lua
@@ -92,7 +92,7 @@ local ImageData = {}
---@overload fun(outFile: string)
---@overload fun(outFile: string, format: love.ImageFormat)
---@param format love.ImageFormat # The format to encode the image as.
----@param filename string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned.
+---@param filename? string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned.
---@return love.FileData filedata # The encoded image as a new FileData object.
function ImageData:encode(format, filename) end
@@ -152,10 +152,10 @@ function ImageData:getWidth() end
---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
---
---@param pixelFunction function # Function to apply to every pixel.
----@param x number # The x-axis of the top-left corner of the area within the ImageData to apply the function to.
----@param y number # The y-axis of the top-left corner of the area within the ImageData to apply the function to.
----@param width number # The width of the area within the ImageData to apply the function to.
----@param height number # The height of the area within the ImageData to apply the function to.
+---@param x? number # The x-axis of the top-left corner of the area within the ImageData to apply the function to.
+---@param y? number # The y-axis of the top-left corner of the area within the ImageData to apply the function to.
+---@param width? number # The width of the area within the ImageData to apply the function to.
+---@param height? number # The height of the area within the ImageData to apply the function to.
function ImageData:mapPixel(pixelFunction, x, y, width, height) end
---