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
|
|
|
|
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=#SpriteFrame] clone
|
|
|
|
-- @param self
|
|
|
|
-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setRotated
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool rotated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- set texture of the frame, the texture is retained
|
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
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-06-11 10:30:38 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getOffset
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-06-11 10:30:38 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
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=#SpriteFrame] setRectInPixels
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #rect_table rectInPixels
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- get texture of the frame
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getTexture
|
|
|
|
-- @param self
|
|
|
|
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- get rect of the frame
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getRect
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- set offset of the frame
|
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
|
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=#SpriteFrame] getRectInPixels
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- set 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
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- get original size of the trimmed image
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getOriginalSizeInPixels
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- set original size of the trimmed image
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setOriginalSizeInPixels
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #size_table sizeInPixels
|
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=#SpriteFrame] setOffset
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table offsets
|
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=#SpriteFrame] isRotated
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- set rect of the frame
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] setRect
|
|
|
|
-- @param self
|
|
|
|
-- @param #rect_table rect
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- get offset of the frame
|
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-09-02 13:45:07 +08:00
|
|
|
-- get original size of the trimmed image
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#SpriteFrame] getOriginalSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
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
|
|
|
|
|
|
|
return nil
|