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

Method createWithTexture

core/2d/Sprite.cpp:52–62  ·  view source on GitHub ↗

MARK: create, init, dealloc

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

autoreleaseMethod · 0.80
initWithTextureMethod · 0.45

Tested by

no test coverage detected