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

Method getTexture

core/2d/SpriteFrame.cpp:240–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240Texture2D* SpriteFrame::getTexture()
241{
242 if (_texture)
243 {
244 return _texture;
245 }
246
247 if (!_textureFilename.empty())
248 {
249 return Director::getInstance()->getTextureCache()->addImage(_textureFilename);
250 }
251 // no texture or texture filename
252 return nullptr;
253}
254
255void SpriteFrame::setPolygonInfo(const PolygonInfo& polygonInfo)
256{

Callers

nothing calls this directly

Calls 4

getInstanceFunction · 0.85
getTextureCacheMethod · 0.80
emptyMethod · 0.45
addImageMethod · 0.45

Tested by

no test coverage detected