MCPcopy Create free account
hub / github.com/axmolengine/axmol / createWithSpriteFrame

Method createWithSpriteFrame

core/ui/UIScale9Sprite.cpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets)
81{
82 Scale9Sprite* ret = new Scale9Sprite();
83 if (ret->initWithSpriteFrame(spriteFrame, capInsets))
84 {
85 ret->autorelease();
86 return ret;
87 }
88 AX_SAFE_DELETE(ret);
89 return nullptr;
90}
91
92Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame)
93{

Callers

nothing calls this directly

Calls 2

autoreleaseMethod · 0.80
initWithSpriteFrameMethod · 0.45

Tested by

no test coverage detected