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

Method createWithSpriteFrame

core/2d/AnchoredSprite.cpp:114–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114AnchoredSprite* AnchoredSprite::createWithSpriteFrame(SpriteFrame* spriteFrame)
115{
116 AnchoredSprite* asprite = new AnchoredSprite();
117 if (spriteFrame && asprite->initWithSpriteFrame(spriteFrame))
118 {
119 asprite->autorelease();
120 return asprite;
121 }
122 AX_SAFE_DELETE(asprite);
123 return nullptr;
124}
125
126AnchoredSprite* AnchoredSprite::createWithSpriteFrameName(std::string_view spriteFrameName)
127{

Callers

nothing calls this directly

Calls 2

autoreleaseMethod · 0.80
initWithSpriteFrameMethod · 0.45

Tested by

no test coverage detected