2020-07-29 01:00:25 +08:00
|
|
|
|
#ifndef HGL_GRAPH_FONT_INCLUDE
|
2020-06-28 22:16:07 +08:00
|
|
|
|
#define HGL_GRAPH_FONT_INCLUDE
|
|
|
|
|
|
2020-07-28 16:34:29 +08:00
|
|
|
|
#include<hgl/type/DataType.h>
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
|
|
|
|
namespace hgl
|
|
|
|
|
{
|
2020-07-29 01:00:25 +08:00
|
|
|
|
namespace graph
|
|
|
|
|
{
|
|
|
|
|
constexpr size_t MAX_FONT_NAME_LENGTH=128;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 字体信息
|
|
|
|
|
*/
|
|
|
|
|
struct Font
|
|
|
|
|
{
|
|
|
|
|
os_char name[MAX_FONT_NAME_LENGTH]; ///<字体名称
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
2020-07-29 01:00:25 +08:00
|
|
|
|
int width; ///<宽度
|
|
|
|
|
int height; ///<高度
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
2020-07-29 01:00:25 +08:00
|
|
|
|
bool bold; ///<加粗
|
|
|
|
|
bool italic; ///<右斜
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
2020-07-29 01:00:25 +08:00
|
|
|
|
bool anti; ///<反矩齿
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
2020-07-29 01:00:25 +08:00
|
|
|
|
public:
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
2020-07-29 01:00:25 +08:00
|
|
|
|
Font();
|
2020-07-31 18:01:28 +08:00
|
|
|
|
Font(const os_char *,int,int,bool b=false,bool i=false,bool=true);
|
2020-06-28 22:16:07 +08:00
|
|
|
|
|
2020-07-29 01:00:25 +08:00
|
|
|
|
CompOperatorMemcmp(const Font &); ///<比较操作符重载
|
|
|
|
|
};//struct Font
|
|
|
|
|
}//namespace graph
|
2020-06-28 22:16:07 +08:00
|
|
|
|
}//namespace hgl
|
|
|
|
|
#endif//HGL_GRAPH_FONT_INCLUDE
|