Function Model-----------------------------------
1:void GUI_DispChar(U16 c);
Displays a single character using the current font at the current text position in the current window.
c character displayed
2:void GUI_DispCharAt(U16 c, I16P x, I16P y);
Displays a single character using the current font at the specified position in the current window.
c character displayed
x to write to the x position of the window
y The y position to write to the window
3:void GUI_DispChars(U16 c, int Cnt);
Displays the character the specified number of times using the current font at the current text position in the current window.
c character displayed
Number of repetitions of Cnt
4:void GUI_DispNextLine(void);
Move the cursor to the beginning of the next line.
5:void GUI_DispString(const char GUI_FAR * s);
Displays the string passed as argument using the current font at the current text position in the current window.
s the string to display
6:void GUI_DispStringAt(const char GUI_FAR * s, int x, int y);
Displays the string passed as argument using the current font at the specified position in the current window.
s the string to display
x to write to the x position of the window
y The y position to write to the window
7:void GUI_DispStringAtCEOL(const char GUI_FAR * s, int x, int y);
This routine takes exactly the same parameters as GUI_DispStringAt() .
It does the same thing: displays the given string at the specified position . However, after doing this, it calls the GUI_DispCEOL() routine to clear the rest of the line until
the end of the line.
This routine is convenient if a string is to overwrite other strings and the string is shorter than the original string .
8: void GUI_DispStringHCenterAt(const char GUI_FAR * s, int x, int y);
At the specified position in the current window, horizontally center the string as argument using the current font.
s the string to display
x to write to the x position of the window
y The y position of the window to be written to
9: void GUI_DispStringInRect(const char GUI_FAR * s,
GUI_RECT * pRect,
int Align);
at the specified position within the rectangular area specified by the current window, use the current font to display the string as a parameter.
s the string to display
pRect window rectangle position to be written
Align alignment marks, which can be combined by "" "OR" operations. Vertical alignment and horizontal alignment should be used in combination
Vertical alignment: GUI_TA_TOP, GUI_TA_BOTTOM, GUI_TA_VCENTER
Horizontal alignment: GUI_TA_LEFT, GUI_TA_RIGHT, GUI_TA_HCENTER
10:void GUI_DispStringInRectEx(const char * s,
GUI_RECT * pRect,
int TextAlign,
int MaxLen,
const GUI_ROTATION * pLCD_Api);
s the string to display
pRect The rectangular area to be written to the window
TextAlign
Alignment marks, which can be combined by "" "OR" operations. Vertical alignment and horizontal alignment should be used in combination
Vertical alignment: GUI_TA_TOP, GUI_TA_BOTTOM, GUI_TA_VCENTER
Horizontal alignment: GUI_TA_LEFT, GUI_TA_RIGHT, GUI_TA_HCENTER
MaxLen maximum number of characters displayed
pLCD_Api GUI_ROTATE_0 Do not rotate text, display from left to right
GUI_ROTATE_180 rotates the text 180 degrees
GUI_ROTATE_CCW rotates the text counterclockwise
GUI_ROTATE_CW rotates the text clockwise
11 :void GUI_DispStringInRectWrap (const char GUI_UNI_PTR * s,
GUI_RECT * pRect,
int TextAlign,
GUI_WRAPMODE WrapMode);
At the specified position within the specified rectangular area of the current window, use the current font to display the character string, with automatic line wrapping (optional).
s the string to display
pRect The rectangular area to be written to the window
TextAlign
Alignment marks, which can be combined by "" "OR" operations. Vertical alignment and horizontal alignment should be used in combination
Vertical alignment: GUI_TA_TOP, GUI_TA_BOTTOM, GUI_TA_VCENTER
Horizontal alignment: GUI_TA_LEFT, GUI_TA_RIGHT, GUI_TA_HCENTER
WrapMode GUI_WRAPMODE_NONE does not perform word wrapping
GUI_WRAPMODE_WORD Wrap text word by word
GUI_WRAPMODE_CHAR Wrap text by character
12:void GUI_DispStringLen(const char GUI_FAR * s, int Len);
At the current text position in the current window, displays the string given as argument in the specified number of characters using the current font.
s the string to display
len number of characters displayed
13:int GUI_WrapGetNumLines(const char GUI_UNI_PTR * pText,
int xSize,
GUI_WRAPMODE WrapMode) ;
Returns the number of lines of the specified text with the word wrap mode set.
String displayed by pText
xSize X-size for drawing text
WrapMode GUI_WRAPMODE_NONE does not perform word wrapping
GUI_WRAPMODE_WORD Wrap text word by word
GUI_WRAPMODE_CHAR Wrap text by character
Return value: The selected text alignment mode
Text drawing mode: normal text, reversed text, transparent text, XOR text, transparent reversed text
14:int GUI_GetTextMode(void);
Returns the currently selected text mode
15:int GUI_SetTextMode(int TextMode);
Set the text mode according to the specified parameters
The text mode set by TextMode, which can be any combination of TEXTMODE tags using OR combination
TextMode GUI_TEXTMODE_NORMAL is set to display normal text
GUI_TEXTMODE_REV is set to display reversed text
GUI_TEXTMODE_TRANS is set to display transparent text
GUI_TEXTMODE_XOR is set to the text displayed in reverse
Return value: the previously selected text mode
16:char GUI_SetTextStyle(char Style);
Style the text according to the specified parameters
Text style set by Style
GUI_TS_NORMAL display normal text
GUI_TS_UNDERLINE display underlined text
GUI_TS_STRIKETHRU Display strikethrough text
GUI_TS_OVERLINE display text with top line
Return value: The previously selected text style
17:int GUI_GetTextAlign(void);
Returns the current text alignment mode
18:void GUI_SetLBorder(int x)
Set the left border of the current window after wrapping
x the new left bound
19 :int GUI_SetTextAlign (int TextAlign);
Sets the text alignment mode for the string output of the current window
The text alignment mode set by TextAlign, which can be a combination of horizontal and vertical alignment
GUI_TA_LEFT x-axis aligned left
GUI_TA_HCENTER center on x-axis
GUI_TA_RIGHT x-axis direction right alignment
GUI_TA_TOP The y-axis of the character is aligned to the top
GUI_TA_VCENTER Center the y-axis direction
GUI_TA_BOTTOM aligns the bottom pixel line of the font's y-axis
20:char GUI_GotoXY(int x, int y);
char GUI_GotoX(int x);
char GUI_GotoY(int y);
Set the current text writing position
x the new x-axis position
y the new y-axis position
21:int GUI_GetDispPosX(void);
int GUI_GetDispPosY(void);
Returns the current x position and y position
22:void GUI_Clear(void);
clear the current window
23:void GUI_DispCEOL(void);
Clears the current (or displayed) content from the current text position to the end of the line, the height is the height of the current font
Some commonly used text display functions to learn.