2017-05-29 07:54:57 +00:00
|
|
|
#ifndef _INCLUDE_GUI_FONT_H_
|
|
|
|
#define _INCLUDE_GUI_FONT_H_
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2019-02-24 15:03:05 +00:00
|
|
|
//= Include files. =//
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2017-08-02 14:24:26 +00:00
|
|
|
#include "SGUI_Common.h"
|
|
|
|
#include "SGUI_Basic.h"
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= User Macro definition. =//
|
|
|
|
//=======================================================================//
|
2017-05-29 07:54:57 +00:00
|
|
|
#define FONT_LIB_ADDR 0X00000
|
|
|
|
// Max font size is 64 pix, maximum of font data size is 64 * 8 = 512 Bytes.
|
|
|
|
#define TEXT_NUMBER_STR_LENGTH_MAX (12)
|
|
|
|
#define TEXT_PLACEHOLDER_CHARACTER ('*')
|
2019-12-01 15:04:02 +00:00
|
|
|
#define SGUI_IS_VISIBLE_CHAR(C) ((C>0x1F) && (C<0x7F))
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= Data type definition. =//
|
|
|
|
//=======================================================================//
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= Public variable declaration. =//
|
|
|
|
//=======================================================================//
|
2019-12-09 14:11:37 +00:00
|
|
|
extern SGUI_CSZSTR SGUI_EMPTY_STRING;
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
|
|
|
//= Public function declaration. =//
|
|
|
|
//=======================================================================//
|
2019-12-01 15:04:02 +00:00
|
|
|
void SGUI_Text_GetTextExtent(SGUI_CSZSTR cszTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_AREA_SIZE* pstTextExtent);
|
2019-12-25 15:23:13 +00:00
|
|
|
void SGUI_Text_DrawText(SGUI_SCR_DEV* pstDeviceIF, SGUI_CSZSTR cszTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_RECT* pstDisplayArea, SGUI_POINT* pstInnerPos, SGUI_DRAW_MODE eFontMode);
|
|
|
|
SGUI_SIZE SGUI_Text_DrawMultipleLinesText(SGUI_SCR_DEV* pstDeviceIF, SGUI_CSZSTR szTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_RECT* pstDisplayArea, SGUI_INT iTopOffset, SGUI_DRAW_MODE eFontMode);
|
2019-12-01 15:04:02 +00:00
|
|
|
SGUI_SIZE SGUI_Text_GetTextGraphicsWidth(SGUI_CSZSTR szText, const SGUI_FONT_RES* pstFontRes);
|
|
|
|
SGUI_SIZE SGUI_Text_GetMultiLineTextLines(SGUI_CSZSTR cszText, const SGUI_FONT_RES* pstFontRes, SGUI_SIZE uiDisplayAreaWidth);
|
|
|
|
SGUI_SIZE SGUI_Text_GetCharacterData(const SGUI_FONT_RES* pstFontRes, SGUI_UINT32 uiCode, SGUI_BYTE* pDataBuffer, SGUI_SIZE sBufferSize);
|
2017-05-29 07:54:57 +00:00
|
|
|
|
|
|
|
#endif
|