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

Function addImageToDemo

tests/cpp-tests/Source/Texture2dTest/Texture2dTest.cpp:2364–2372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2362}
2363
2364static void addImageToDemo(TextureDemo& demo, float x, float y, const char* path, backend::PixelFormat format)
2365{
2366 auto sprite = Sprite::create(path, format);
2367 sprite->setPosition(Vec2(x, y));
2368 demo.addChild(sprite, 0);
2369
2370 // remove texture from texture manager
2371 Director::getInstance()->getTextureCache()->removeTexture(sprite->getTexture());
2372}
2373
2374// TextureConvertRGB888
2375void TextureConvertRGB888::onEnter()

Callers 1

onEnterMethod · 0.85

Calls 8

createFunction · 0.85
getInstanceFunction · 0.85
removeTextureMethod · 0.80
getTextureCacheMethod · 0.80
Vec2Function · 0.50
setPositionMethod · 0.45
addChildMethod · 0.45
getTextureMethod · 0.45

Tested by

no test coverage detected