标签:horizon nes uri rda cells return 背景 idt mamicode
GUI_DispString("Hello world!");
GUI_SetColor() // 设置前景颜色 GUI_SetBkColor() // 设置背景颜色 GUI_SetTextMode() // 选择文字模式
Example
GUI_SetFont(&GUI_Font8x16); GUI_SetBkColor(GUI_BLUE); GUI_Clear(); GUI_SetPenSize(10); GUI_SetColor(GUI_RED); GUI_DrawLine(80, 10, 240, 90); GUI_DrawLine(80, 90, 240, 10); GUI_SetBkColor(GUI_BLACK); GUI_SetColor(GUI_WHITE); GUI_SetTextMode(GUI_TM_NORMAL); GUI_DispStringHCenterAt("GUI_TM_NORMAL" , 160, 10); GUI_SetTextMode(GUI_TM_REV); GUI_DispStringHCenterAt("GUI_TM_REV" , 160, 26); GUI_SetTextMode(GUI_TM_TRANS); GUI_DispStringHCenterAt("GUI_TM_TRANS" , 160, 42); GUI_SetTextMode(GUI_TM_XOR); GUI_DispStringHCenterAt("GUI_TM_XOR" , 160, 58); GUI_SetTextMode(GUI_TM_TRANS | GUI_TM_REV); GUI_DispStringHCenterAt("GUI_TM_TRANS | GUI_TM_REV", 160, 74);
Screenshot of above example
GUI_GotoX()
GUI_GotoY()
GUI_GotoXY()
Routine |
Description |
Displaying text |
|
GUI_DispCEOL() |
Clears the current line from the current position to the end. |
GUI_DispChar() |
Displays a single character. |
GUI_DispCharAt() |
Displays a single character at the specified position. |
GUI_DispChars() |
Displays a character a specified number of times. |
GUI_DispString() |
Displays a string. |
GUI_DispStringAt() |
Displays a string at the specified position. |
GUI_DispStringAtCEOL() |
Displays a string at the specified position and clears the cur-rent line to the end. |
GUI_DispStringHCenterAt() |
Displays a string centered horizontally at the given position. |
GUI_DispStringInRect() |
Displays a string in the specified rectangle. |
GUI_DispStringInRectEx() |
Displays a string rotated in the specified rectangle. |
GUI_DispStringInRectWrap() |
Displays a string wrapped in the specified rectangle. |
GUI_DispStringinRectWrapEx() |
Displays a string rotated and wrapped in the specified rectan-gle. |
GUI_DispStringLen() |
Displays a string at the current position with specified number of characters. |
GUI_WrapGetNumLines() |
Returns the number lines required to display the given stringusing the given wrap mode at the given size. |
Drawing modes |
|
GUI_GetTextMode() |
Returns the currently set drawing mode. |
GUI_SetTextMode() |
Sets the drawing mode. |
GUI_SetTextStyle() |
Sets the style to be used. |
GUI_SetClearTextRectMode() |
Enables clear rect mode when displaying a string in a rectan-gle. |
Alignment |
|
GUI_GetTextAlign() |
Returns the currently set text alignment. |
GUI_SetLBorder() |
Sets the size of the left border to be used after line feeds. |
GUI_SetTextAlign() |
Sets the text alignment. |
Position |
|
GUI_DispNextLine() |
Moves the cursor to the beginning of the next line. |
GUI_GotoX() |
Sets the X-position. |
GUI_GotoXY() |
Sets the X- and Y-position. |
GUI_GotoY() |
Sets the Y-position. |
GUI_GetDispPosX() |
Returns the current X-position. |
GUI_GetDispPosY() |
Returns the current Y-position. |
标签:horizon nes uri rda cells return 背景 idt mamicode
原文地址:https://www.cnblogs.com/qiyuexin/p/10420877.html