add TextLayout

This commit is contained in:
hyzboy 2020-07-20 21:29:15 +08:00
parent ec3919626e
commit a3745e927d

View File

@ -3,16 +3,12 @@
#include<hgl/graph/font/FontSource.h>
#include<hgl/graph/RenderableInstance.h>
#include<hgl/graph/VertexBuffer.h>
#include<hgl/graph/RenderableCreater.h>
#include<hgl/type/RectScope.h>
namespace hgl
{
namespace graph
{
class TextRenderable:public vulkan::Renderable
{
};//class TextRenderable:public vulkan::Renderable
/**
*
*/
@ -20,12 +16,26 @@ namespace hgl
{
FontSource *source;
public:
enum class Direction
{
LeftToRight=0, ///<横排从左到右
RightToLeft, ///<横排从右到左
TopToRight, ///<坚排从上到下从右到左
};//enum class Direction
RectScope2f scope; ///<绘制区域
bool text_symbols; ///<是否开启文本到符号自动替换
bool symbols_edge_disable; ///<符号边界禁用
public:
TextLayout(FontSource *fs):source(fs){}
virtual ~TextLayout()=default;
bool Layout(const UTF16String &);
};//class TextLayout
}//namespace graph
}//namespace hgl