Class for a text atlas.
#include <graphics/YiTextAtlas.h>

Public Member Functions | |
| CYITextAtlas () | |
| virtual | ~CYITextAtlas () |
| virtual bool | CreateNewFontAtlas (uint32_t uWidth, uint32_t uHeight) override |
| virtual void | SetRegion (ssize_t nID, void *pReference, YI_REGION Region, const uint8_t *pData, const int32_t nStride) override |
Public Member Functions inherited from CYIAbstractTextAtlas | |
| CYIAbstractTextAtlas () | |
| virtual | ~CYIAbstractTextAtlas () |
| virtual YI_TEXTURE_DETAILS * | GetTexture (ssize_t nID, void *pReference) override |
| int32_t | GetGlyphPadding () const |
| bool | AddGlyph (const uint32_t uGlyphWidth, const uint32_t uGlyphHeight, YI_GLYPH_DETAILS *pGlyphDetails, const uint8_t *pData, const int32_t nStride) |
Public Member Functions inherited from CYITextureAtlas | |
| CYITextureAtlas () | |
| virtual | ~CYITextureAtlas () |
| bool | CreateNewAtlas (uint32_t unWidth, uint32_t unHeight, uint32_t unPages) |
| YI_REGION | GetRegion (int32_t nWidth, int32_t nHeight) |
| void | UpdateAtlas () |
| const std::shared_ptr< CYIBitmap > | GetBitmap () const |
| const std::vector< glm::ivec4 > * | GetNodes (uint32_t unPage) const |
| virtual std::shared_ptr< CYIAssetTexture > | GetGLTexture () const |
| const std::shared_ptr< CYIAssetTexture > | GetTextureAsset () |
| YI_LOADED_TEXTURES * | GetLoadedTextures () |
| void | SetTextureFilter (CYIAssetTexture::YI_MIN_MAG_FILTER minificationFilter, CYIAssetTexture::YI_MIN_MAG_FILTER magnificationFilter) |
| void | SetTextureWrap (CYIAssetTexture::YI_TEXTURE_WRAP wrapS, CYIAssetTexture::YI_TEXTURE_WRAP wrapT) |
| void | SetName (const CYIString &name) |
| const CYIString & | GetName () const |
| float | GetAtlasPercentageUsed () const |
| bool | RenderAtlasToPng (const CYIString &filePath) const |
| void | Reset () |
Additional Inherited Members | |
Protected Member Functions inherited from CYIAbstractTextAtlas | |
| void | SetGlyphPadding (int32_t nGlyphPadding) |
| virtual bool | CompareGlyphDetails (YI_GLYPH_DETAILS *pLeft, YI_GLYPH_DETAILS *pRight) const |
Protected Member Functions inherited from CYITextureAtlas | |
| int32_t | Fit (uint32_t unPage, uint32_t unIndex, int32_t nWidth, int32_t nHeight) |
| void | Merge (uint32_t unPage) |
Protected Attributes inherited from CYITextureAtlas | |
| CYIString | m_name |
| std::shared_ptr< CYIBitmap > | m_Image |
| std::vector< glm::ivec4 > | m_Nodes [4] |
| std::shared_ptr< CYIAssetTexture > | m_pTextureAsset |
| YI_LOADED_TEXTURES | m_Textures |
| int32_t | m_nWidth |
| int32_t | m_nHeight |
| uint32_t | m_unPages |
| CYIAssetTexture::YI_TEXTURE_CONFIG | m_textureConfiguration |
| uint32_t | m_unPixelsUsed |
| uint32_t | m_unLastUpdatedSize |
| CYITextAtlas::CYITextAtlas | ( | ) |
|
virtual |
|
overridevirtual |
Should be implemented to do any internal initialization of the text atlas such as creating the atlas buffer. The width and height of the buffer are given as parameters.
Implements CYIAbstractTextAtlas.
|
overridevirtual |
Should be implemented to write the given data to the atlas buffer and store a reference to it as a YI_TEXTURE_DETAILS.
| [in] | nID | A user provided ID. The implementation can use this for whatever it wants |
| [in] | pReference | A user provided pointer. The implementation can use this for whatever it wants |
| [in] | Region | The region in the atlas to write the data to |
| [in] | pData | The data to write to the atlas |
| [in] | nStride | The stride of pData |
Implements CYIAbstractTextAtlas.