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

Method setTexture

src/Core/Graphics/Sprite.cpp:124–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 void Sprite::setTexture(const Texture& texture)
125 {
126 // m_texture = std::shared_ptr<Texture>(std::shared_ptr<Texture>(), texture);
127 m_sprite.setTexture(texture);
128 m_sprite.setTextureRect(
129 sf::IntRect(0, 0, texture.getSize().x, texture.getSize().y));
130 }
131
132 void Sprite::setTextureRect(
133 unsigned int x, unsigned int y, unsigned int width, unsigned int height)

Callers 5

SpriteMethod · 0.95
updateMethod · 0.45
loadTextureMethod · 0.45
renderMethod · 0.45
applyTextureMethod · 0.45

Calls 2

setTextureRectMethod · 0.45
getSizeMethod · 0.45

Tested by

no test coverage detected