MCPcopy Create free account
hub / github.com/SFML/SFML / setTexture

Method setTexture

src/SFML/Graphics/Sprite.cpp:51–59  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

49
50////////////////////////////////////////////////////////////
51void Sprite::setTexture(const Texture& texture, bool resetRect)
52{
53 // Recompute the texture area if requested
54 if (resetRect)
55 setTextureRect(IntRect({0, 0}, Vector2i(texture.getSize())));
56
57 // Assign the new texture
58 m_texture = &texture;
59}
60
61
62////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

getSizeMethod · 0.45

Tested by

no test coverage detected