A collection of sub-texture.
Definition: TextureAtlas.h:64
void setTexture(const Texture &texture)
Change the source texture of the atlas.
Definition: TextureAtlas.h:120
A texture for colored images.
Definition: Texture.h:317
TextureAtlas()
Default constructor.
Definition: TextureAtlas.h:69
RectF getTextureRect(const std::string &name) const
Get the texture rectangle in normalized coordinates.
const Path & getTexturePath() const
Get the texture path.
Definition: TextureAtlas.h:103
void addSubTexture(std::string name, const RectU &rect)
Add a sub-texture to the atlas.
const Texture * getTexture() const
Get the source texture of the atlas.
Definition: TextureAtlas.h:135
void setTexturePath(const Path &path)
Set the texture path.
Definition: TextureAtlas.h:93
bool loadFromFile(const Path &filename)
Load an atlas from a XML file.
void unsetTexture()
Unset the source texture of the atlas.
Definition: TextureAtlas.h:146
RectU getSubTexture(const std::string &name) const
Get the sub-texture rectangle.