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

Method getSize

src/Core/Graphics/Texture.cpp:121–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 Transform::UnitVector Texture::getSize() const
122 {
123 sf::Vector2u textureSize;
124 if (std::holds_alternative<sf::Texture>(m_texture))
125 {
126 textureSize = std::get<sf::Texture>(m_texture).getSize();
127 }
128 if (std::holds_alternative<std::shared_ptr<sf::Texture>>(m_texture))
129 {
130 textureSize = std::get<std::shared_ptr<sf::Texture>>(m_texture)->getSize();
131 }
132 if (std::holds_alternative<const sf::Texture*>(m_texture))
133 {
134 textureSize = std::get<const sf::Texture*>(m_texture)->getSize();
135 }
136 return Transform::UnitVector(
137 textureSize.x, textureSize.y, Transform::Units::ScenePixels);
138 }
139
140 void Texture::setAntiAliasing(bool antiAliasing)
141 {

Callers

nothing calls this directly

Calls 1

UnitVectorClass · 0.85

Tested by

no test coverage detected