コード例 #1
0
ファイル: GUIChar.c プロジェクト: Jaly314/CH-K-Lib
/*********************************************************************
*
*       GL_DispChar
*/
void GL_DispChar(U16 c) {
  /* check for control characters */
  if (c == '\n') {
    GUI_DispNextLine();
  } else {
    if (c != '\r') {
      GUI_LOCK();
      GUI_Context.pAFont->pfDispChar(c);
      if (GUI_pfDispCharStyle) {
        GUI_pfDispCharStyle(c);
      }
      GUI_UNLOCK();
    }
  }
}
コード例 #2
0
ファイル: GUICharLine.c プロジェクト: ChunHungLiu/ubuntu230os
/*********************************************************************
*
*       _DispLine
*/
static void _DispLine(const char GUI_UNI_PTR *s, int MaxNumChars, const GUI_RECT *pRect) {
  /* Check if we have anything to do at all ... */
  if (GUI_Context.pClipRect_HL) {
    if (GUI_RectsIntersect(GUI_Context.pClipRect_HL, pRect) == 0)
      return;
  }

 // #if GUI_COMPILER_SUPPORTS_FP
  //if (GUI_Context.pAFont->pafEncode) {
 //  GUI_Context.pAFont->pafEncode->pfDispLine(s, MaxNumChars);
 // } else {
 // #else
  {
 // #endif
    U16 Char;
    while (--MaxNumChars >= 0) {
      Char = GUI_UC__GetCharCodeInc(&s);
      GUI_Context.pAFont->pfDispChar(Char);
      if (GUI_pfDispCharStyle) {
        GUI_pfDispCharStyle(Char);
      }
    }
  }
}