![]() |
Skylicht Engine
|
The object class holds data on an image, including the locations of sprites and frames on it. More...
#include <Graphics2D/SpriteFrame/CSpriteAtlas.h>
Public Member Functions | |
| CSpriteAtlas (ECOLOR_FORMAT format, int width, int height) | |
| SFrame * | addFrame (const char *name, const char *path, const char *frameId=NULL) |
| SImage * | createAtlasRect (int w, int h, core::recti &outRegion) |
| void | updateTexture () |
| std::vector< SModuleRect * > & | getModules () |
| std::vector< SFrame * > & | getFrames () |
| std::vector< SImage * > & | getImages () |
| int | getWidth () |
| int | getHeight () |
| Public Member Functions inherited from Skylicht::CSpriteFrame | |
| bool | load (const char *fileName) |
| std::vector< SFrame * > & | getFrames () |
| SFrame * | getFrameByName (const char *name) |
| SFrame * | getFrameById (const char *id) |
| const char * | getId () |
| const char * | getPath () |
Protected Member Functions | |
| SImage * | addEmptyAtlas () |
Protected Attributes | |
| int | m_width |
| int | m_height |
| ECOLOR_FORMAT | m_fmt |
| Protected Attributes inherited from Skylicht::CSpriteFrame | |
| std::vector< SImage * > | m_images |
| std::vector< SFrame * > | m_frames |
| std::vector< SModuleRect * > | m_modules |
| std::map< std::string, SFrame * > | m_names |
| std::map< std::string, SFrame * > | m_ids |
| bool | m_deleteAtlas |
| std::string | m_id |
| std::string | m_path |
The object class holds data on an image, including the locations of sprites and frames on it.
Then, use the CGraphics2D object or the CGUISprite, CGUIFitSprite to draw this sprite and image.