A 9-slice sprite for cocos2d.
9-slice scaling allows you to specify how scaling is applied to specific areas of a sprite. With 9-slice scaling (3x3 grid), you can ensure that the sprite does not become distorted when scaled.
#include <Geode/cocos/extensions/GUI/CCControlExtension/CCScale9Sprite.h>
A 9-slice sprite for cocos2d.
9-slice scaling allows you to specify how scaling is applied to specific areas of a sprite. With 9-slice scaling (3x3 grid), you can ensure that the sprite does not become distorted when scaled.
Creates a 9-slice sprite with a texture file, a delimitation zone and with the specified cap insets.
Creates a 9-slice sprite with a texture file and a delimitation zone. The texture will be broken down into a 3×3 grid of equal blocks.
Creates a 9-slice sprite with a texture file. The whole texture will be broken down into a 3×3 grid of equal blocks.
Creates a 9-slice sprite with a texture file. The whole texture will be broken down into a 3×3 grid of equal blocks.
Creates a 9-slice sprite with an sprite frame and the centre of its zone. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
Creates a 9-slice sprite with an sprite frame. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
Creates a 9-slice sprite with an sprite frame name and the centre of its zone. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
Creates a 9-slice sprite with an sprite frame name. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
Original sprite’s size.
Prefered sprite’s size. By default the prefered size is the original size.
Prefered sprite’s size. By default the prefered size is the original size.
The end-cap insets. On a non-resizeable sprite, this property is set to CGRectZero; the sprite does not use end caps and the entire sprite is subject to stretching.
The end-cap insets. On a non-resizeable sprite, this property is set to CGRectZero; the sprite does not use end caps and the entire sprite is subject to stretching.
Sets the left side inset
Sets the top side inset
Sets the right side inset
Sets the bottom side inset
Initializes a 9-slice sprite with a texture file, a delimitation zone and with the specified cap insets. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
file
rect
capInsets
Initializes a 9-slice sprite with a texture file and a delimitation zone. The texture will be broken down into a 3×3 grid of equal blocks. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
file
rect
Initializes a 9-slice sprite with a texture file and with the specified cap insets. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
file
capInsets
Initializes a 9-slice sprite with a texture file. The whole texture will be broken down into a 3×3 grid of equal blocks. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
file
Initializes a 9-slice sprite with an sprite frame and with the specified cap insets. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
spriteFrame
capInsets
Initializes a 9-slice sprite with an sprite frame. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
spriteFrame
Initializes a 9-slice sprite with an sprite frame name and with the specified cap insets. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
spriteFrameName
capInsets
Initializes a 9-slice sprite with an sprite frame name. Once the sprite is created, you can then call its “setContentSize:” method to resize the sprite will all it’s 9-slice goodness intract. It respects the anchorPoint too.
spriteFrameName
Creates and returns a new sprite object with the specified cap insets. You use this method to add cap insets to a sprite or to change the existing cap insets of a sprite. In both cases, you get back a new image and the original sprite remains untouched.
capInsets
sets the premultipliedAlphaOpacity property. If set to NO then opacity will be applied as: glColor(R,G,B,opacity); If set to YES then oapcity will be applied as: glColor(opacity, opacity, opacity, opacity ); Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO
returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity);
Original sprite’s size.
Prefered sprite’s size. By default the prefered size is the original size.
The end-cap insets. On a non-resizeable sprite, this property is set to CGRectZero; the sprite does not use end caps and the entire sprite is subject to stretching.
Sets the left side inset
Sets the top side inset
Sets the right side inset
Sets the bottom side inset