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

Method createWithTexture

core/2d/AnchoredSprite.cpp:49–59  ·  view source on GitHub ↗

MARK: create, init, dealloc

Source from the content-addressed store, hash-verified

47
48// MARK: create, init, dealloc
49AnchoredSprite* AnchoredSprite::createWithTexture(Texture2D* texture)
50{
51 AnchoredSprite* asprite = new AnchoredSprite();
52 if (asprite->initWithTexture(texture))
53 {
54 asprite->autorelease();
55 return asprite;
56 }
57 AX_SAFE_DELETE(asprite);
58 return nullptr;
59}
60
61AnchoredSprite* AnchoredSprite::createWithTexture(Texture2D* texture, const Rect& rect, bool rotated)
62{

Callers

nothing calls this directly

Calls 2

autoreleaseMethod · 0.80
initWithTextureMethod · 0.45

Tested by

no test coverage detected