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

Method addImage

tests/cpp-tests/Source/RenderTextureTest/RenderTextureTest.cpp:151–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void RenderTextureSave::addImage(ax::Object* sender)
152{
153 auto s = Director::getInstance()->getWinSize();
154
155 // begin drawing to the render texture
156 _target->begin();
157
158 Sprite* sprite = Sprite::create("Images/test-rgba1.png");
159 sprite->setPosition(
160 sprite->getContentSize().width + AXRANDOM_0_1() * (s.width - sprite->getContentSize().width),
161 sprite->getContentSize().height + AXRANDOM_0_1() * (s.height - sprite->getContentSize().height));
162 sprite->visit();
163
164 // finish drawing and return context back to the screen
165 _target->end();
166}
167
168RenderTextureSave::~RenderTextureSave()
169{

Callers 15

SetupTexturesMethod · 0.45
shouldNotCrashMethod · 0.45
StressTest2Method · 0.45
onCapturedMethod · 0.45
IntervalTestMethod · 0.45
loadDefaultSpritesMethod · 0.45
resetTextureMethod · 0.45
refreshMeshRenderMethod · 0.45
onEnterMethod · 0.45
initMethod · 0.45

Calls 7

getInstanceFunction · 0.85
createFunction · 0.85
beginMethod · 0.45
setPositionMethod · 0.45
getContentSizeMethod · 0.45
visitMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected