summaryrefslogtreecommitdiff
path: root/meta/3rd/love2d/library/love.image.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-20 16:40:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-20 16:40:27 +0800
commit4bad35e608179e74c9ce186fa2038573055e574b (patch)
treeb820b8f34ab9e8a92cb6093defaab7f65ee13cbd /meta/3rd/love2d/library/love.image.lua
parentee83c8939fdb9547bba993132e71a0638949abe9 (diff)
downloadlua-language-server-4bad35e608179e74c9ce186fa2038573055e574b.zip
first step of love2d-api
Diffstat (limited to 'meta/3rd/love2d/library/love.image.lua')
-rw-r--r--meta/3rd/love2d/library/love.image.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua
new file mode 100644
index 00000000..8101e071
--- /dev/null
+++ b/meta/3rd/love2d/library/love.image.lua
@@ -0,0 +1,24 @@
+---@class love.image
+love.image = {}
+
+---
+---Determines whether a file can be loaded as CompressedImageData.
+---
+---@param filename string # The filename of the potentially compressed image file.
+---@return boolean compressed # Whether the file can be loaded as CompressedImageData or not.
+function love.image.isCompressed(filename) end
+
+---
+---Create a new CompressedImageData object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the CompressedImageFormat page.
+---
+---@param filename string # The filename of the compressed image file.
+---@return CompressedImageData compressedImageData # The new CompressedImageData object.
+function love.image.newCompressedData(filename) end
+
+---
+---Creates a new ImageData object.
+---
+---@param width number # The width of the ImageData.
+---@param height number # The height of the ImageData.
+---@return ImageData imageData # The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero.
+function love.image.newImageData(width, height) end