• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GUI_SetFont函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GUI_SetFont函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_SetFont函数的具体用法?C++ GUI_SetFont怎么用?C++ GUI_SetFont使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GUI_SetFont函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _DemoVScreen

/*********************************************************************
*
*       _DemoVScreen
*/
static void _DemoVScreen(void) {
  int xSize, ySize, j, n;
  int _aDelay[] = { 20, 5};
  GUI_RECT Rect;
  xSize = LCD_GetXSize();
  ySize = LCD_GetYSize();
  GUI_SetFont(&GUI_FontComic24B_ASCII);
  GUI_SetTextMode(GUI_TM_TRANS);
  Rect.x0 = 0;
  Rect.y0 = 0;
  Rect.x1 = xSize - 1;
  Rect.y1 = ySize - 1;
  GUI_SetColor(GUI_WHITE);
  GUI_DispStringInRect("Default screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
  GUI_Delay(250);
  Rect.y0 += ySize;
  Rect.y1 += ySize;
  GUI_DrawGradientV(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 0xFFFFFF, 0x000000);
  Rect.y1 -= ySize / 3;
  GUI_SetColor(GUI_DARKGREEN);
  GUI_DispStringInRect("Here is the virtual screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
  n = ySize / 5;
  for (j = 0; j < GUI_COUNTOF(_aDelay); j++) {
    if (_Loop(0, 5, n, _aDelay[j]) == 1) {
      return;
    }
    GUI_SetOrg(0, ySize);
    GUI_Delay(250);
    if (_Loop(ySize, -5, n, _aDelay[j]) == 1) {
      return;
    }
    GUI_SetOrg(0, 0);
    GUI_Delay(250);
    if (GUIDEMO_CheckCancel()) {
      return;
    }
  }
  for (j = 0; j < 5; j++) {
    GUI_SetOrg(0, ySize);
    GUI_Delay(200);
    GUI_SetOrg(0, 0);
    GUI_Delay(200);
    if (GUIDEMO_CheckCancel()) {
      return;
    }
  }
  GUIDEMO_Delay(1000);
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:52,代码来源:GUIDEMO_VScreen.c


示例2: _cbDemoCallback2

/*******************************************************************
*
*       _cbDemoCallback2
*/
static void _cbDemoCallback2(WM_MESSAGE* pMsg) {
  int x, y;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(GUI_MAGENTA);
    GUI_Clear();
    GUI_SetColor(GUI_YELLOW);
    GUI_SetFont(&GUI_FontComic18B_1);
    x = WM_GetWindowSizeX(pMsg->hWin);
    y = WM_GetWindowSizeY(pMsg->hWin);
    GUI_DispStringHCenterAt("Window 2\nanother Callback", x / 2, (y / 4) - 18);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:20,代码来源:WM_Sample.c


示例3: _cbBk

/*********************************************************************
*
*       _cbBk
*
* Purpose:
*   Callback routine of desktop window
*/
static void _cbBk(WM_MESSAGE * pMsg) {
  WM_HWIN hWin;
  int xSize;

  hWin = pMsg->hWin;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    xSize = LCD_GetXSize();
    GUI_SetBkColor(GUI_DARKBLUE);
    GUI_Clear();
    GUI_SetFont(GUI_FONT_20_ASCII);
    GUI_DispStringHCenterAt("Sample shows usage of", xSize / 2, 5);
    GUI_DispStringHCenterAt("GUI_MEMDEV_GetDataPtr()", xSize / 2, 25);
    break;
  }
}
开发者ID:dadianxukong,项目名称:gps,代码行数:23,代码来源:MEMDEV_UseDataPointer.c


示例4: MainTask

void MainTask(void) {

    /*GUI_Init();*/
    WIDGET_SetDefaultEffect(&WIDGET_Effect_Simple);
    GUI_SetBkColor(0xF9F9F9);
    GUI_Clear();
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_FontComic24B_ASCII);
    GUI_DispStringHCenterAt("Smart Wardrobe", 120, 6);

    while (1) {
        GUI_Exec();
        GUI_Delay(100);
    }
    /*GUI_BMP_Draw(&bmpfile, 0, 0);*/
}
开发者ID:bobogei81123,项目名称:jjj,代码行数:16,代码来源:main.c


示例5: Table


//.........这里部分代码省略.........
#include "bsp.h"

extern "C" {
    #include "GUI.h"
    #include "WM.h"                                   // emWin Windows Manager
    #include "DIALOG.h"
    #include "SIM.h"
}

Q_DEFINE_THIS_FILE

// Active object class -------------------------------------------------------
class Table : public QActive {
private:
    uint8_t m_fork[N_PHILO];
    uint8_t m_isHungry[N_PHILO];

public:
    Table();

private:
    static QState initial(Table *me, QEvt const *e);
    static QState ready  (Table *me, QEvt const *e);
    static QState serving(Table *me, QEvt const *e);
    static QState paused (Table *me, QEvt const *e);
};

#define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1)) % N_PHILO))
#define LEFT(n_)  ((uint8_t)(((n_) + 1) % N_PHILO))
enum m_forkState { FREE, USED };

// Local objects -------------------------------------------------------------
static Table l_table;                                    // local Table object

#ifdef Q_SPY
    enum QSUserRecords {
        PHILO_STAT = QS_USER,
        TABLE_STAT
    };
    static uint8_t const l_onDialogGUI = 0U;
#endif

// Public-scope objects ------------------------------------------------------
QActive * const AO_Table = &l_table;                    // "opaque" AO pointer


// GUI definition ============================================================
static WM_HWIN l_hDlg;
static WM_CALLBACK *l_cb_WM_HBKWIN;

static const GUI_WIDGET_CREATE_INFO l_dialog[] = {
    { &FRAMEWIN_CreateIndirect, "Dining Philosopher Problem",
        0,  30,  30, 260, 180, FRAMEWIN_CF_MOVEABLE },
    { &TEXT_CreateIndirect, "Philosopher 0",
        GUI_ID_TEXT9,  50,  10, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "Philosopher 1",
        GUI_ID_TEXT9,  50,  30, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "Philosopher 2",
        GUI_ID_TEXT9,  50,  50, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "Philosopher 3",
        GUI_ID_TEXT9,  50,  70, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "Philosopher 4",
        GUI_ID_TEXT9,  50,  90, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "Table",
        GUI_ID_TEXT9,  50, 110, 0, 0, TEXT_CF_LEFT },

    { &TEXT_CreateIndirect, "thinking",
        GUI_ID_TEXT0, 130,  10, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "thinking",
        GUI_ID_TEXT1, 130,  30, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "thinking",
        GUI_ID_TEXT2, 130,  50, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "thinking",
        GUI_ID_TEXT3, 130,  70, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "thinking",
        GUI_ID_TEXT4, 130,  90, 0, 0, TEXT_CF_LEFT },
    { &TEXT_CreateIndirect, "serving",
        GUI_ID_TEXT5, 130, 110, 0, 0, TEXT_CF_LEFT },

    { &BUTTON_CreateIndirect,"PAUSE",
        GUI_ID_BUTTON0,    160, 130, 80, 30 }
};

   //..........................................................................*/
static void onMainWndGUI(WM_MESSAGE* pMsg) {
    switch (pMsg->MsgId) {
        case WM_PAINT: {
            GUI_SetBkColor(GUI_GRAY);
            GUI_Clear();
            GUI_SetColor(GUI_BLACK);
            GUI_SetFont(&GUI_Font24_ASCII);
            GUI_DispStringHCenterAt("Dining Philosophers - Demo", 160, 5);
            break;
        }
        default: {
            WM_DefaultProc(pMsg);
            break;
        }
    }
}
开发者ID:QuantumLeaps,项目名称:qpcpp,代码行数:101,代码来源:table.cpp


示例6: _cbChild

/*******************************************************************
*
*       _cbChild
*/
static void _cbChild(WM_MESSAGE* pMsg) {
  int x, y;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(_ChildColor);
    GUI_Clear();
    GUI_SetColor(GUI_RED);
    GUI_SetFont(&GUI_Font24_ASCII);
    x = WM_GetWindowSizeX(pMsg->hWin);
    y = WM_GetWindowSizeY(pMsg->hWin);
    GUI_DispStringHCenterAt("Child window", x / 2, (y / 2) - 12);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:ChijunShen,项目名称:wildfire_stm32_iso,代码行数:20,代码来源:GUIDEMO_WM.c


示例7: _cbBkWindow

/*********************************************************************
*
*       _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE * pMsg) {
  int xPos, yPos;
  xPos = LCD_GetXSize() / 2 - bmSeggerLogoBlue.XSize/2;
  yPos = LCD_GetYSize() / 2 - bmSeggerLogoBlue.YSize/2 ;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(GUI_BLUE);
    GUI_Clear();
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_Font24_ASCII);
    GUI_DispStringHCenterAt("DIALOG_SliderColor - Sample", 160, 5);
    GUI_DrawBitmap(&bmSeggerLogoBlue, xPos, yPos );
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:20,代码来源:DIALOG_SliderColor.c


示例8: _cbBkWindow

/*********************************************************************
*
*       _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE * pMsg) {



  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(GUI_WHITE);
    GUI_Clear();
    GUI_SetColor(GUI_BLACK);
    GUI_SetFont(&GUI_Font24_ASCII);


  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:smithcts,项目名称:SMART_Rail_System,代码行数:20,代码来源:Slider_Menu_GUI.cpp


示例9: GUIDEMO_Touch

void GUIDEMO_Touch(void) {
  #define ID_KEYBOARD  1
  #define ID_TESTCAL   2
  #define ID_CALIBRATE 3
  int i, r;
  int XSize = LCD_GetXSize();
  int YSize = LCD_GetYSize();
  int XMid = XSize / 2;
  int YMid = YSize / 2;
  GUIDEMO_NotifyStartNext();
  GUIDEMO_HideInfoWin();
  do {
    GUI_RECT rText;/*= {0, 80, XSize, 120};*/
    BUTTON_Handle ahButton[3];
    rText.x0=0;
    rText.y0=80;
    rText.x1=XSize;
    rText.y1=120;
    GUI_SetBkColor(GUI_BLUE);
    GUI_Clear();
    GUI_DrawBitmap(&bmSeggerLogoBlue, (XSize - 1 - bmSeggerLogoBlue.XSize) / 2, 15);
    GUI_SetFont(&GUI_FontComic18B_ASCII);
    GUI_DispStringInRect("emWin Touch screen demo", &rText, GUI_TA_HCENTER | GUI_TA_VCENTER);
    ahButton[0] =  BUTTON_Create( XMid - 50, YMid - 20, 100, 50, ID_CALIBRATE,BUTTON_CF_SHOW );
    ahButton[1] =  BUTTON_Create( XMid - 90, YMid + 40, 80, 30, ID_KEYBOARD, BUTTON_CF_SHOW );
    ahButton[2] =  BUTTON_Create( XMid + 10, YMid + 40, 80, 30, ID_TESTCAL,BUTTON_CF_SHOW );
    BUTTON_SetText (ahButton[0], "Calibrate");
    BUTTON_SetBkColor(ahButton[0], 0, GUI_RED);
    BUTTON_SetText (ahButton[1], "Keyboard");
    BUTTON_SetText (ahButton[2], "Test calibration");
    BUTTON_SetFont(ahButton[0], &GUI_FontComic18B_ASCII);
    r = GUIDEMO_WaitKey();
    if (r==0) {
      r = ID_KEYBOARD;
      BUTTON_SetState(ahButton[1], BUTTON_STATE_PRESSED);
      GUIDEMO_Delay(500);
    }
    for (i=0; i< countof(ahButton); i++) {
      BUTTON_Delete(ahButton[i]);
    }
    switch (r) {
    case ID_KEYBOARD:  r= _ExecKeyboard(); break;
    case ID_CALIBRATE: _ExecCalibration(); break;
    case ID_TESTCAL:   _TestCalibration(); break;
    }
  } while (r && (r!='n') && (r!='N'));
}
开发者ID:ChijunShen,项目名称:wildfire_stm32_iso,代码行数:47,代码来源:GUIDEMO_Touch.c


示例10: _cbWindow

/*******************************************************************
*
*       _cbWindow
*/
static void _cbWindow(WM_MESSAGE* pMsg) {
  GUI_RECT Rect;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    WM_GetInsideRect(&Rect);
    GUI_SetBkColor(GUI_RED);
    GUI_SetColor(GUI_YELLOW);
    GUI_ClearRectEx(&Rect);
    GUI_DrawRectEx(&Rect);
    GUI_SetColor(GUI_BLACK);
    GUI_SetFont(&GUI_Font8x16);
    GUI_DispStringHCenterAt("Foreground window", 75, 40);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:satyanarayangullapalli,项目名称:arm_lpc_1788_sdk,代码行数:21,代码来源:WM_Redraw.c


示例11: _UserDraw

static void _UserDraw(WM_HWIN hWin, int Stage) {
  if (Stage == GRAPH_DRAW_LAST)
  {
    char acText[] = "Flow Rate L/s";
    GUI_RECT Rect;
    GUI_RECT RectInvalid;
    int      FontSizeY;

    GUI_SetFont(&GUI_Font13_ASCII);
    FontSizeY = GUI_GetFontSizeY();
    WM_GetInsideRect(&Rect);
    WM_GetInvalidRect(hWin, &RectInvalid);
    Rect.x1 = Rect.x0 + FontSizeY;
    GUI_SetColor(GUI_RED);
    GUI_DispStringInRectEx(acText, &Rect, GUI_TA_HCENTER, strlen(acText), GUI_ROTATE_CCW);
  }
}
开发者ID:FXRer,项目名称:STM32F4_DISCOVERY,代码行数:17,代码来源:win.c


示例12: test_gui

/*******************************************************************************
*  Function Name  :   testgui 
*  Description    : GUI测试函数,初化后,显示数据
*  Input          : None
*  Output         : None
*  Return         : None
*******************************************************************************/
void test_gui(void)
{
  int i;  
	RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
    GUI_Init();
    GUI_Initialized = 1;
    GUI_DispChars('/', 53);     
    for( i= 0; i < 240; i += 8)   
    {        
        GUI_DispCharAt('/', 312, i);
        GUI_DispCharAt('/', 1,   i);
    } 
    GUI_DispChars('/', 52); 
    GUI_SetFont(&GUI_Font24B_ASCII);
    GUI_SetColor(GUI_RED); 
    GUI_DispStringAt("This is a test program!",10,110);
}
开发者ID:TIMCHENY,项目名称:STM32F107Board-rttproject,代码行数:24,代码来源:testgui.c


示例13: _cbBk

/*********************************************************************
*
*       _cbBk
*/
static void _cbBk(WM_MESSAGE * pMsg) {
  int xSize, ySize;

  switch (pMsg->MsgId) {
  case WM_PAINT:
    xSize = LCD_GetXSize();
    ySize = LCD_GetYSize();
    GUI_DrawGradientV(0, 0, xSize, ySize, GUI_BLUE, GUI_BLACK);
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_Font24_ASCII);
    GUI_SetTextMode(GUI_TM_TRANS);
    GUI_DispStringHCenterAt("WIDGET_Spinbox - Sample", 160, 5);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:dadianxukong,项目名称:gps,代码行数:21,代码来源:WIDGET_Spinbox.c


示例14: main

int main(void)
{

  /* USER CODE BEGIN 1 */

  /* USER CODE END 1 */

  /* MCU Configuration----------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_CRC_Init();
  MX_USART1_UART_Init();
//  MX_RTC_Init();  /**< 重新用cube生成工程时 注释掉此函数 再下载 */

  /* USER CODE BEGIN 2 */
    rtc_init();     /**< 使用改造后的初始化函数实现备份掉电时的数据 */
    
    GUI_Init();
    GUI_UC_SetEncodeUTF8();
    GUI_SetFont(&GUI_Font24B_1);
    GUI_SetBkColor(GUI_BLACK);
    GUI_SetColor(GUI_GREEN);

  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */
    RTC_display_current_time(20, 170);
    RTC_display_current_date(120, 170);  
  }
  /* USER CODE END 3 */

}
开发者ID:ZBT1314douhao,项目名称:STM32F107VCT6,代码行数:46,代码来源:main.c


示例15: main

int main(void)
{
	GUI_MEMDEV_Handle hMem0,hMem1;
	SysTick_Config(180000);
	SDRAM_Init();
	
	LCD_Config();
	
	GUI_Init();
	GUI_SetFont(&GUI_Font32B_ASCII);
	GUI_SetBkColor(GUI_BLUE);
	GUI_SetColor(GUI_YELLOW);
	GUI_Clear();

//	GUI_DispStringAt("blacklight",0,100);
	
//	GUIDEMO_Main();
	
	hMem0 = GUI_MEMDEV_CreateFixed(0,0,100,50,GUI_MEMDEV_NOTRANS,GUI_MEMDEV_APILIST_32,GUI_COLOR_CONV_888);
	hMem1 = GUI_MEMDEV_CreateFixed(0,0,100,50,GUI_MEMDEV_NOTRANS,GUI_MEMDEV_APILIST_32,GUI_COLOR_CONV_888);
	GUI_MEMDEV_Select(hMem0);
	GUI_Clear();
	GUI_DispString("Text");
	GUI_MEMDEV_CopyToLCDAt(hMem0,0,0);
	
	while(1)
	{	
		GUI_MEMDEV_Select(hMem1);
		GUI_MEMDEV_DrawPerspectiveX(hMem0,0,0,50,50-50*i/100,100-100*i/100,25*i/100);
		GUI_MEMDEV_CopyToLCDAt(hMem1,i,50+i);
		
		GUI_Delay(10);
		
		GUI_MEMDEV_Select(hMem1);
		GUI_Clear();
		GUI_MEMDEV_CopyToLCDAt(hMem1,i,50+i);
		
		i+=1;
		if(i>100)
		{
			i=0;
		}
	}
	
	while(1);
}
开发者ID:dydynfnf,项目名称:lool-lens,代码行数:46,代码来源:main.c


示例16: ShowKeyPadString

void ShowKeyPadString(char* STR)
	{
	GUI_SetFont(Upper_Font); 
	GUI_SetColor(GW_BLACKV);
	GUI_SetBkColor(GW_WHITE);        
	/*Clear 27 chars*/
	GUI_SetTextAlign(GUI_TA_LEFT);
	GUI_GotoXY(73,97);
	//GUI_DispChars(' ',41);//For Clear String
	GUI_DispChars(' ',50);//For Clear String
	/*Clear channel mark area.*/        
	GUI_SetBkColor(GW_WHITE);
	GUI_SetTextAlign(GUI_TA_CENTER);        
	GUI_GotoXY(161,97);
	GUI_DispChar(' ');//For Clear String
	GUI_DispStringAt(STR,162,97);
	}
开发者ID:yaochein,项目名称:yao_1000,代码行数:17,代码来源:Keypadm.c


示例17: _cbWindow1

static void _cbWindow1(WM_MESSAGE* pMsg) {
  int x, y,d;
  
  switch (pMsg->MsgId) {
  case WM_PAINT:
//    GUI_SetBkColor(_WindowColor1);
      
//    GUI_SetColor(GUI_WHITE);
//    GUI_SetFont(&GUI_Font24_ASCII);
	  if(curbuttonid != -1)
	  {
			GUI_SetColor(GUI_WHITE); 
			GUI_SetBkColor(GUI_BLUE);
			GUI_SetFont(&GUI_FontHZ12);		
			GUI_Clear(); 
			x = WM_GetWindowSizeX(pMsg->hWin);
			y = WM_GetWindowSizeY(pMsg->hWin);
			GUI_DispStringHCenterAt(pButton[curbuttonid].desc, x / 2, (y / 2) + 30);
		}
    break;
  case WM_NOTIFY_PARENT:
	  //#define WM_NOTIFICATION_CLICKED             1
      //#define WM_NOTIFICATION_RELEASED            2
	   if(pMsg->Data.v == WM_NOTIFICATION_RELEASED)
	   {
			x = WM_GetWindowSizeX(pMsg->hWin);
			y = WM_GetWindowSizeY(pMsg->hWin);
			d = GetButtonID(pMsg->hWinSrc);
			GUI_Clear();
			GUI_DispStringHCenterAt(pButton[d].desc, x / 2, (y / 2) + 30);
			curbuttonid = d;
			if(pButton[d].ExeProg)
			{
				//OSTaskCreate (pButton[d].ExeProg,pMsg->hWin, &TaskStk[TASK_STK_SIZE-1],20);
				printf("new 1 task\n");
				pButton[d].ExeProg(pMsg->hWin,0,0);
				
				 // CREATE_TASK(&aTCB[0],pButton[d].title,pButton[d].ExeProg,80,Stack_0);
			}
	   }
	  break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:HackLinux,项目名称:jz4725,代码行数:45,代码来源:Desktop.c


示例18: _cbWindow2

/*******************************************************************
*
*       _cbWindow2
*/
static void _cbWindow2(WM_MESSAGE* pMsg) {
  int x, y;
  switch (pMsg->MsgId) {
  case WM_PAINT:
    GUI_SetBkColor(_WindowColor2);
    GUI_Clear();
    GUI_SetColor(GUI_WHITE);
    GUI_SetFont(&GUI_Font24_ASCII);
    x = WM_GetWindowSizeX(pMsg->hWin);
    y = WM_GetWindowSizeY(pMsg->hWin);
    GUI_DispStringHCenterAt("Window 2", x / 2, (y / 4) - 12);
    break;
  case WM_SIZE:
    WM_InvalidateWindow(_hChild);
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:ChijunShen,项目名称:wildfire_stm32_iso,代码行数:23,代码来源:GUIDEMO_WM.c


示例19: _DemoOrData

/*******************************************************************
*
*       _DemoOrData
*/
static void _DemoOrData(void) {
  int i;
  PARAM Param;
  GUI_RECT Rect = {19, (LCD_YSIZE - 20) - YSIZE, (LCD_XSIZE - 2), (LCD_YSIZE - 21)};
  GUI_HMEM hMem = GUI_ALLOC_AllocZero(405 * sizeof(I16));
  GUI_SetColor(GUI_WHITE);
  GUI_SetBkColor(GUI_RED);
  GUI_ClearRect(0, 55, LCD_XSIZE, 75);
  GUI_SetFont(&GUI_FontComic18B_1);
  GUI_DispStringAt("Several waves...", 20 ,55);
  Param.aY = GUI_ALLOC_h2p(hMem);
  _GetSineData(Param.aY, 405);
  GUI_MEMDEV_Draw(&Rect, _Draw, &Param, 0, 0);
  for (i = 0; (i < 90); i++) {
    _DrawOrData(GUI_GREEN, ++Param.aY);
    GUI_Delay(10);
  }
  GUI_ALLOC_Free(hMem);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:23,代码来源:memdev_drawgraph.c


示例20: showTime

void showTime( /*char *cardType,  uint8_t *bUidPresent, uint8_t *nCardDetected, uint8_t *nCardPrevious*/)
{
	  char msg[100];

	  Chip_RTC_GetFullTime(&FullTime);
	    sprintf( msg, "%.2d:%.2d:%.2d %.2d/%.2d/%.4d\r\n", FullTime.time[2],
	    		FullTime.time[1],
	    		FullTime.time[0],
	    		FullTime.time[3],
	    		FullTime.time[6],
	    		FullTime.time[7]);

	    GUI_SetColor(GUI_WHITE);
	    GUI_FillRect( 0, 214, 317, 214 );
	    GUI_SetFont(&GUI_Font24B_ASCII);
	    GUI_DispStringAt( msg, 60, 215);
	    GUI_SetColor(GUI_GREEN);

}
开发者ID:lollofranziPoliMi,项目名称:med-nager,代码行数:19,代码来源:mainGUI.c



注:本文中的GUI_SetFont函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GUI_SetTextMode函数代码示例发布时间:2022-05-30
下一篇:
C++ GUI_SetColor函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap