ULRE/inc/hgl/graph/font/TileFont.h

41 lines
1.2 KiB
C
Raw Normal View History

2020-07-29 01:00:25 +08:00
#ifndef HGL_GRAPH_TILE_FONT_INCLUDE
2020-06-29 19:49:54 +08:00
#define HGL_GRAPH_TILE_FONT_INCLUDE
#include<hgl/graph/TileData.h>
#include<hgl/graph/font/FontSource.h>
#include<hgl/type/ResPool.h>
2020-06-29 19:49:54 +08:00
namespace hgl
{
namespace graph
{
2020-07-31 22:21:44 +08:00
using TileResPool=ResPool<u32char,TileObject *>;
2020-07-31 18:01:28 +08:00
2020-07-01 20:36:49 +08:00
/**
* Tile字符管理<br>
* unicode块, unicode块只能对应一个字体数据来源
*/
2020-06-29 19:49:54 +08:00
class TileFont
{
2020-07-07 19:16:23 +08:00
FontSource *source;
2020-06-29 19:49:54 +08:00
TileData *tile_data;
TileResPool to_res;
2020-07-31 18:01:28 +08:00
public:
FontSource *GetFontSource (){return source;}
TileData * GetTileData (){return tile_data;}
2020-06-29 19:49:54 +08:00
public:
TileFont(TileData *td,FontSource *fs);
virtual ~TileFont();
2020-07-31 18:01:28 +08:00
2020-07-31 22:21:44 +08:00
bool Registry(List<TileUVFloat> &,const List<u32char> &); ///<注册要使用的字符
2020-07-31 18:01:28 +08:00
void Unregistry(const List<u32char> &); ///<注销要使用的字符
2020-06-29 19:49:54 +08:00
};//class TileFont
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_TILE_FONT_INCLUDE