summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/library/cc.Image.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-05 20:51:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-05 20:51:43 +0800
commit8fefb8f3e100976235dc83d6ae3785952d11c710 (patch)
tree459117e6cecc70824273c4d32285cb6eec468098 /meta/3rd/Cocos4.0/library/cc.Image.lua
parentb6c18d05410fd4ca209f9c34e0992caf40cf3701 (diff)
downloadlua-language-server-8fefb8f3e100976235dc83d6ae3785952d11c710.zip
cleanup
Diffstat (limited to 'meta/3rd/Cocos4.0/library/cc.Image.lua')
-rw-r--r--meta/3rd/Cocos4.0/library/cc.Image.lua73
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/3rd/Cocos4.0/library/cc.Image.lua b/meta/3rd/Cocos4.0/library/cc.Image.lua
new file mode 100644
index 00000000..e1c28616
--- /dev/null
+++ b/meta/3rd/Cocos4.0/library/cc.Image.lua
@@ -0,0 +1,73 @@
+---@meta
+
+---@class cc.Image :cc.Ref
+local Image={ }
+cc.Image=Image
+
+
+
+
+---*
+---@return boolean
+function Image:hasPremultipliedAlpha () end
+---*
+---@return self
+function Image:reversePremultipliedAlpha () end
+---*
+---@return boolean
+function Image:isCompressed () end
+---*
+---@return boolean
+function Image:hasAlpha () end
+---*
+---@return int
+function Image:getPixelFormat () end
+---*
+---@return int
+function Image:getHeight () end
+---*
+---@return self
+function Image:premultiplyAlpha () end
+---* brief Load the image from the specified path.<br>
+---* param path the absolute file path.<br>
+---* return true if loaded correctly.
+---@param path string
+---@return boolean
+function Image:initWithImageFile (path) end
+---*
+---@return int
+function Image:getWidth () end
+---*
+---@return int
+function Image:getBitPerPixel () end
+---*
+---@return int
+function Image:getFileType () end
+---*
+---@return string
+function Image:getFilePath () end
+---*
+---@return int
+function Image:getNumberOfMipmaps () end
+---* brief Save Image data to the specified file, with specified format.<br>
+---* param filePath the file's absolute path, including file suffix.<br>
+---* param isToRGB whether the image is saved as RGB format.
+---@param filename string
+---@param isToRGB boolean
+---@return boolean
+function Image:saveToFile (filename,isToRGB) end
+---* treats (or not) PVR files as if they have alpha premultiplied.<br>
+---* Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is<br>
+---* possible load them as if they have (or not) the alpha channel premultiplied.<br>
+---* By default it is disabled.
+---@param haveAlphaPremultiplied boolean
+---@return self
+function Image:setPVRImagesHavePremultipliedAlpha (haveAlphaPremultiplied) end
+---* Enables or disables premultiplied alpha for PNG files.<br>
+---* param enabled (default: true)
+---@param enabled boolean
+---@return self
+function Image:setPNGPremultipliedAlphaEnabled (enabled) end
+---* js ctor
+---@return self
+function Image:Image () end \ No newline at end of file