21 #ifndef GF_TEXTURE_ATLAS_H
22 #define GF_TEXTURE_ATLAS_H
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
104 return m_texturePath;
121 m_texture = &texture;
179 std::map<std::string, RectU> m_rects;
182 #ifndef DOXYGEN_SHOULD_SKIP_THIS
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:339
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
#define GF_API
Definition: Portability.h:35
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.