Texture atlas. More...
#include <Atlas.hpp>
Classes | |
| class | Not_Child |
| Thrown when trying to free a bitmap that isn't a child of the atlas. More... | |
| class | Too_Big |
| Thrown when trying to allocate a too-large section of the atlas. More... | |
Public Member Functions | |
| Atlas (int width_, int height_, int x_res_=16, int y_res_=16) | |
| Creates a texture atlas with the specified dimensions and resolution. | |
| void | NewPage () |
| Creates a new page on the atlas. | |
| std::auto_ptr< Bitmap > | Add (Bitmap &bitmap) |
| Allocates room for and copies an existing bitmap in to the atlas. | |
| std::auto_ptr< Bitmap > | Alloc (int width, int height) |
| Allocates an image to the atlas with the specified width/height. | |
| int | Pages () const |
| Returns the number of pages in the atlas. | |
| a5::Bitmap & | GetPage (int page) const |
| Returns the atlas bitmap for the given page. | |
| void | Clear (bool delete_pages=false) |
| Frees all of the allocated bitmaps in the atlas. | |
| ~Atlas () | |
| Destroys all of the atlas pages and references. | |
Friends | |
| class | a5::Atlas_Bitmap |
Texture atlas.
| a5::Atlas::Atlas | ( | int | width_, | |
| int | height_, | |||
| int | x_res_ = 16, |
|||
| int | y_res_ = 16 | |||
| ) |
Creates a texture atlas with the specified dimensions and resolution.
| a5::Atlas::~Atlas | ( | ) |
Destroys all of the atlas pages and references.
| void a5::Atlas::NewPage | ( | ) |
Creates a new page on the atlas.
Allocates room for and copies an existing bitmap in to the atlas.
| Atlas::Too_Big |
| std::auto_ptr< Bitmap > a5::Atlas::Alloc | ( | int | width, | |
| int | height | |||
| ) |
Allocates an image to the atlas with the specified width/height.
| Atlas::Not_Child |
| int a5::Atlas::Pages | ( | ) | const |
Returns the number of pages in the atlas.
| a5::Bitmap& a5::Atlas::GetPage | ( | int | page | ) | const |
Returns the atlas bitmap for the given page.
| std::out_of_range |
| void a5::Atlas::Clear | ( | bool | delete_pages = false |
) |
Frees all of the allocated bitmaps in the atlas.
1.7.1