2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Image
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Ref
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] hasPremultipliedAlpha
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- 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.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] saveToFile
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string filename
|
|
|
|
-- @param #bool isToRGB
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] hasAlpha
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] isCompressed
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] getHeight
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- brief Load the image from the specified path.<br>
|
|
|
|
-- param path the absolute file path.<br>
|
|
|
|
-- return true if loaded correctly.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] initWithImageFile
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string path
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] getWidth
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-07-28 11:38:12 +08:00
|
|
|
-- @function [parent=#Image] getBitPerPixel
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-07-28 11:38:12 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] getFileType
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] getNumberOfMipmaps
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] getRenderFormat
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-07-28 11:38:12 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- 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.
|
2014-07-28 11:38:12 +08:00
|
|
|
-- @function [parent=#Image] setPVRImagesHavePremultipliedAlpha
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool haveAlphaPremultiplied
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Image#Image self (return value: cc.Image)
|
2014-07-28 11:38:12 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- js ctor
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Image] Image
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Image#Image self (return value: cc.Image)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
return nil
|