2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module SpriteFrame
|
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
|
|
|
|
2015-12-15 17:56:10 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Set anchor point of the frame.<br>
|
|
|
|
-- param anchorPoint The anchor point of the sprite frame.
|
|
|
|
-- @function [parent=#SpriteFrame] setAnchorPoint
|
|
|
|
-- @param self
|
|
|
|
-- @param #vec2_table anchorPoint
|
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Set texture of the frame, the texture is retained.<br>
|
|
|
|
-- param pobTexture The texture of the sprite frame.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setTexture
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Texture2D pobTexture
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Get texture of the frame.<br>
|
|
|
|
-- return The texture of the sprite frame.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getTexture
|
|
|
|
-- @param self
|
|
|
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Set offset of the frame.<br>
|
|
|
|
-- param offsetInPixels The offset of the sprite frame, in pixels.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setOffsetInPixels
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table offsetInPixels
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-10-28 11:29:16 +08:00
|
|
|
-- Get original size of the trimmed image.<br>
|
|
|
|
-- return The original size of the trimmed image, in pixels.
|
|
|
|
-- @function [parent=#SpriteFrame] getOriginalSizeInPixels
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-10-28 11:29:16 +08:00
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Set original size of the trimmed image.<br>
|
|
|
|
-- param sizeInPixels The original size of the trimmed image.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setOriginalSize
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #size_table sizeInPixels
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-10-28 11:29:16 +08:00
|
|
|
-- Set rect of the sprite frame.<br>
|
|
|
|
-- param rectInPixels The rect of the sprite frame, in pixels.
|
|
|
|
-- @function [parent=#SpriteFrame] setRectInPixels
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-10-28 11:29:16 +08:00
|
|
|
-- @param #rect_table rectInPixels
|
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-10-28 11:29:16 +08:00
|
|
|
-- Get rect of the frame.<br>
|
|
|
|
-- return The rect of the sprite frame.
|
|
|
|
-- @function [parent=#SpriteFrame] getRect
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-10-28 11:29:16 +08:00
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Set offset of the frame.<br>
|
|
|
|
-- param offsets The offset of the sprite frame.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setOffset
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table offsets
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-10-28 11:29:16 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, string, rect_table, bool, vec2_table, size_table
|
|
|
|
-- @overload self, string, rect_table
|
|
|
|
-- @function [parent=#SpriteFrame] initWithTextureFilename
|
|
|
|
-- @param self
|
|
|
|
-- @param #string filename
|
|
|
|
-- @param #rect_table rect
|
|
|
|
-- @param #bool rotated
|
|
|
|
-- @param #vec2_table offset
|
|
|
|
-- @param #size_table originalSize
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Set rect of the frame.<br>
|
|
|
|
-- param rect The rect of the sprite.
|
|
|
|
-- @function [parent=#SpriteFrame] setRect
|
|
|
|
-- @param self
|
|
|
|
-- @param #rect_table rect
|
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, cc.Texture2D, rect_table, bool, vec2_table, size_table
|
|
|
|
-- @overload self, cc.Texture2D, rect_table
|
|
|
|
-- @function [parent=#SpriteFrame] initWithTexture
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Texture2D pobTexture
|
|
|
|
-- @param #rect_table rect
|
|
|
|
-- @param #bool rotated
|
|
|
|
-- @param #vec2_table offset
|
|
|
|
-- @param #size_table originalSize
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2015-10-28 11:29:16 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Get original size of the trimmed image.<br>
|
|
|
|
-- return The original size of the trimmed image.
|
|
|
|
-- @function [parent=#SpriteFrame] getOriginalSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#SpriteFrame] clone
|
|
|
|
-- @param self
|
|
|
|
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Get rect of the sprite frame.<br>
|
|
|
|
-- return The rect of the sprite frame, in pixels.
|
|
|
|
-- @function [parent=#SpriteFrame] getRectInPixels
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Is the sprite frame rotated or not.<br>
|
|
|
|
-- return Is rotated if true.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] isRotated
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
2015-10-28 11:29:16 +08:00
|
|
|
-- Set rotated of the sprite frame.<br>
|
|
|
|
-- param rotated Rotated the sprite frame if true.
|
|
|
|
-- @function [parent=#SpriteFrame] setRotated
|
2015-05-05 11:31:53 +08:00
|
|
|
-- @param self
|
|
|
|
-- @param #bool rotated
|
2015-10-28 11:29:16 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-10-28 11:29:16 +08:00
|
|
|
-- Get offset of the frame.<br>
|
|
|
|
-- return The offset of the sprite frame.
|
|
|
|
-- @function [parent=#SpriteFrame] getOffset
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-10-28 11:29:16 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Set original size of the trimmed image.<br>
|
|
|
|
-- param sizeInPixels The original size of the trimmed image, in pixels.
|
|
|
|
-- @function [parent=#SpriteFrame] setOriginalSizeInPixels
|
|
|
|
-- @param self
|
|
|
|
-- @param #size_table sizeInPixels
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-12-15 17:56:10 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Get anchor point of the frame.<br>
|
|
|
|
-- return The anchor point of the sprite frame.
|
|
|
|
-- @function [parent=#SpriteFrame] getAnchorPoint
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2016-01-20 18:21:41 +08:00
|
|
|
-- Check if anchor point is defined for the frame.<br>
|
2015-12-15 17:56:10 +08:00
|
|
|
-- return true if anchor point is available.
|
|
|
|
-- @function [parent=#SpriteFrame] hasAnchorPoint
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-18 22:02:42 +08:00
|
|
|
-- Get offset of the frame.<br>
|
|
|
|
-- return The offset of the sprite frame, in pixels.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getOffsetInPixels
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, string, rect_table, bool, vec2_table, size_table
|
|
|
|
-- @overload self, string, rect_table
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] create
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string filename
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param #rect_table rect
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool rotated
|
|
|
|
-- @param #vec2_table offset
|
|
|
|
-- @param #size_table originalSize
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Texture2D, rect_table, bool, vec2_table, size_table
|
|
|
|
-- @overload self, cc.Texture2D, rect_table
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] createWithTexture
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Texture2D pobTexture
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param #rect_table rect
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool rotated
|
|
|
|
-- @param #vec2_table offset
|
|
|
|
-- @param #size_table originalSize
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- lua NA
|
|
|
|
-- @function [parent=#SpriteFrame] SpriteFrame
|
|
|
|
-- @param self
|
|
|
|
-- @return SpriteFrame#SpriteFrame self (return value: cc.SpriteFrame)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|