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

Method initWithTexture

core/2d/Sprite.cpp:172–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172bool Sprite::initWithTexture(Texture2D* texture)
173{
174 AXASSERT(texture != nullptr, "Invalid texture for sprite");
175
176 Rect rect = Rect::ZERO;
177 if (texture)
178 rect.size = texture->getContentSize();
179
180 return initWithTexture(texture, rect, false);
181}
182
183bool Sprite::initWithTexture(Texture2D* texture, const Rect& rect)
184{

Callers 10

createWithTextureMethod · 0.45
createWithTextureMethod · 0.45
createWithTextureMethod · 0.45
createWithTextureMethod · 0.45
createSpriteTextureMethod · 0.45
loadImageMethod · 0.45
loadMovieClipMethod · 0.45
createWithTextureMethod · 0.45
createWithTextureMethod · 0.45
createWithTextureMethod · 0.45

Calls 6

setBatchNodeFunction · 0.85
initFunction · 0.70
setDirtyFunction · 0.70
setAnchorPointFunction · 0.50
getContentSizeMethod · 0.45
setZeroMethod · 0.45

Tested by

no test coverage detected