| 170 | } |
| 171 | |
| 172 | bool 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 | |
| 183 | bool Sprite::initWithTexture(Texture2D* texture, const Rect& rect) |
| 184 | { |
no test coverage detected