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

C++ GUI_ClearRect函数代码示例

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

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



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

示例1: _ShowComments

/*******************************************************************
*
*       _ShowComments
*
* Shows all comments of a GIF file
*/
static void _ShowComments(const char * pFile, int FileSize) {
  GUI_RECT Rect          = {80, 100, 239, 199};
  char     acBuffer[256] = {0};
  int      CommentCnt;
  /* Display sample information */
  GUI_SetFont(&GUI_Font8x16);
  GUI_ClearRect(0, 40, 319, 59);
  GUI_DispStringHCenterAt("Show all comments of a GIF file", 160, 40);
  /* Show all comments */
  GUI_ClearRect(0, 60, 319, 239);                                 /* Clear the image area */
  CommentCnt = 0;
  while (!GUI_GIF_GetComment(pFile, FileSize, (unsigned char *)acBuffer, sizeof(acBuffer), CommentCnt)) {
    char acNumber[12] = "Comment #0:";
    acNumber[9] = '0' + CommentCnt;
    GUI_DispStringHCenterAt(acNumber, 160, 80);
    GUI_SetBkColor(GUI_BLACK);
    GUI_SetColor(GUI_WHITE);
    GUI_ClearRectEx(&Rect);
    GUI_DispStringInRectWrap(acBuffer, &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER, GUI_WRAPMODE_WORD);
    GUI_SetBkColor(GUI_WHITE);
    GUI_SetColor(GUI_BLACK);
    GUI_Delay(4000);                                              /* Wait a while */
    CommentCnt++;
  }
}
开发者ID:dadianxukong,项目名称:gps,代码行数:31,代码来源:2DGL_DrawGIF.c


示例2: _DrawPolygon

/*******************************************************************
*
*       _DrawPolygon

  Draws polygons of different shapes and colors
*/
static void _DrawPolygon(void) {
  int y = 90;
  /* clear display */
  GUI_SetBkColor(GUI_BLACK);
  GUI_Clear();
  /* display text */
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_Font24_ASCII);
  GUI_SetTextAlign(GUI_TA_HCENTER);
  GUI_DispStringAt("DrawPolygon - Sample", 160, 5);
  GUI_SetFont(&GUI_Font8x16);
  GUI_DispStringAt("using", 5, 40);
  GUI_DispStringAt("GUI_FillPolygon", 5, 55);
  GUI_SetTextAlign(GUI_TA_HCENTER);
  GUI_DispStringAt("Polygons of arbitrary shape\nin any color", 160, y + 90);
  GUI_Delay(500);
  /* draw filled polygons */
  while (1) {
    GUI_ClearRect(100, y, 220, y + 85);
    GUI_SetColor(GUI_BLUE);
    GUI_FillPolygon (&_aPointArrow[0], 7, 160, y + 80);
    GUI_Delay(1000);
    GUI_ClearRect(100, y, 220, y + 85);
    GUI_SetColor(GUI_RED);
    GUI_FillPolygon (&_aPointStar[0], 8, 160, y + 45);
    GUI_Delay(1000);
    GUI_ClearRect(100, y, 220, y + 85);
    GUI_SetColor(GUI_GREEN);
    GUI_FillPolygon(&_aPointHexagon[0], 6, 160, y + 45);
    GUI_Delay(1000);
  }
}
开发者ID:byxob,项目名称:calendar,代码行数:38,代码来源:2DGL_DrawPolygon.c


示例3: _DemoButton

/*******************************************************************
*
*       _DemoButton
*/
static void _DemoButton(void) {
  BUTTON_Handle hButton;
  int Stat = 0;
  GUI_SetFont(&GUI_Font8x16);
  GUI_DispStringHCenterAt("Click on phone button...", 160,80);
  GUI_Delay(500);
  /* Create the button */
  hButton = BUTTON_Create(142, 100, 36, 40, GUI_ID_OK, WM_CF_SHOW);
  /* Modify the button attributes */
  BUTTON_SetBkColor (hButton, 1, GUI_RED);
  /* Loop until button is pressed */
  while (1) {
    BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_1, 2, 4);
    BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_1, 2, 4);
    if (!_Wait(50)) break;
    BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_0, 2, 4);
    BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_0, 2, 4);
    if (!_Wait(45)) break;
    BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_2, 2, 4);
    BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_2, 2, 4);
    if (!_Wait(50)) break;
    BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_0, 2, 4);
    BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_0, 2, 4);
    if (!_Wait(45)) break;
  }
  BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_1, 2, 4);
  BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_1, 2, 4);
  GUI_ClearRect(0, 80, 319, 120);
  GUI_DispStringHCenterAt("You have answered the telephone", 160, 145);
  GUI_Delay(2000);
  /* Delete button object */
  BUTTON_Delete(hButton);
  GUI_ClearRect(0, 50, 319, 239);
  GUI_Delay(400);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:39,代码来源:WIDGET_PhoneButton.c


示例4: _ExecFill

/*********************************************************************
*
*       _ExecFill
*/
static void _ExecFill(void * p) {
  GUI_POINT * pPoint;

  pPoint = (GUI_POINT *)p;
  GUI_SetBkColor(GUI_WHITE);
  GUI_ClearRect(1, 1, pPoint->x - 3, pPoint->y - 3);
  GUI_SetBkColor(GUI_BLACK);
  GUI_ClearRect(3, 3, pPoint->x - 1, pPoint->y - 1);
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:13,代码来源:BASIC_DriverPerformance.c


示例5: _DispCursor

/*********************************************************************
*
*       _DispCursor
*/
static void _DispCursor(void) {
  int i, x, y;
  GUI_DispStringHCenterAt("Available cursors:", 160,  80);
  for (i = 0; i < 12; i++) {
    x = 160 - (_apCursor[i]->pBitmap->XSize / 2);
    y = 120 - (_apCursor[i]->pBitmap->YSize / 2);
    GUI_DrawBitmap(_apCursor[i]->pBitmap, x, y);
    GUI_DispStringHCenterAt(_aacCursorName[i], 160,145);
    GUI_Delay(750);
    GUI_ClearRect(0, 100, 319, 165);
  }
  GUI_ClearRect(0, 80, 319, 100);
  GUI_Delay(500);
}
开发者ID:satyanarayangullapalli,项目名称:arm_lpc_1788_sdk,代码行数:18,代码来源:CURSOR_Sample.c


示例6: _DemoCursor

/*********************************************************************
*
*       _DemoCursor
*/
static void _DemoCursor(void) {
  GUI_SetBkColor(GUI_BLUE);
  GUI_Clear();
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_Font24_ASCII);
  GUI_DispStringHCenterAt("CURSOR_Sample - Sample", 160, 5);
  GUI_SetFont(&GUI_Font8x16);
  while (1) {
    _DispCursor();
    GUI_ClearRect(0, 60, 319, 200);
    _MoveCursor();
    GUI_ClearRect(0, 60, 319, 200);
  }
}
开发者ID:satyanarayangullapalli,项目名称:arm_lpc_1788_sdk,代码行数:18,代码来源:CURSOR_Sample.c


示例7: _GetFileName

/*********************************************************************
*
*       _GetFileName
*
* Purpose:
*   Returns the file name of the XBF file to be used
*/
static void _GetFileName(char * pPath, unsigned MaxSize) {
  WM_HWIN hWin;
  
  /* Set default value on first call */
  if (!strlen(pPath)) {
    strcpy(pPath, "Sample\\GUI\\FONT_ShowXBF\\ExtBinFont.xbf");
  }
  /* Display small hint */
  GUI_SetFont(&GUI_Font10_ASCII);
  GUI_DispStringHCenterAt("Please enter the file name of the XBF-file:", 160, 80);
  /* Create edit widget */
  hWin = EDIT_Create(10, 120, 300, 20, 0, MaxSize, WM_CF_SHOW);
  EDIT_SetText(hWin, pPath);
  WM_SetFocus(hWin);
  /* Wait until GUI_KEY_ENTER has been pressed */
  while (GUI_GetKey() != GUI_KEY_ENTER) {
    GUI_Delay(100);
  }
  /* Get filename from EDIT widget */
  EDIT_GetText(hWin, pPath, MaxSize);
  /* Create edit widget */
  WM_DeleteWindow(hWin);
  /* Clear screen */
  GUI_ClearRect(0, 40, 319, 239);
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:32,代码来源:FONT_ShowXBF.c


示例8: _Paint

static void _Paint(FRAMEWIN_Obj* pObj) {
  WM_HWIN hWin = WM_GetActiveWindow();
  int xsize = WM_GetWindowSizeX(hWin);
  int ysize = WM_GetWindowSizeY(hWin);
  int FrameSize = pObj->FrameSize;
  GUI_RECT rClient; GUI_GetClientRect(&rClient);
  GUI_SetFont(pObj->pFont);
/* Draw Title */
  GUI_SetBkColor((pObj->Widget.State & WIDGET_STATE_CHILD_HAS_FOCUS) ? pObj->BarColor[1] : pObj->BarColor[0]);
  GUI_SetColor  (pObj->TextColor);
  GUI_SetTextAlign(pObj->TextAlign);
	GUI_ClearRect(FrameSize,FrameSize, xsize-1-FrameSize, FrameSize+pObj->rClient.y0-1);
  GUI_DispStringAt( pObj->pText,
                   FrameSize+pObj->XOff,
                   FrameSize+pObj->YOff);
/* Draw Frame */
  GUI_SetColor  (FRAMEWIN_FRAMECOLOR_DEFAULT);  /* pObj->BarColor[1]*/
  GUI_FillRect  (0, 0, xsize-1, FrameSize-1);
	GUI_FillRect  (0, 0, pObj->rClient.x0-1, ysize-1);
	GUI_FillRect  (pObj->rClient.x1+1, 0, xsize-1, ysize-1);
  GUI_FillRect  (0, pObj->rClient.y1+1, xsize-1, ysize-1);
  GUI_FillRect  (0, pObj->TitleHeight+FrameSize,
                    xsize-1, pObj->TitleHeight+2*FrameSize-1);
/* Draw Client area */
  WM_SetUserClipArea(&pObj->rClient);
  /*GUI_SetBkColor(pObj->ClientColor);
  GUI_Clear();*/
  WM_SetUserClipArea(NULL);
/* Draw the 3D effect (if configured) */
  #if FRAMEWIN_USE_3D
    WIDGET_EFFECT_3D_DrawUp();
  #endif
  
}
开发者ID:stormbay,项目名称:DragonVer1.0,代码行数:34,代码来源:framewin.c


示例9: _Label

/*******************************************************************
*
*       _Label

  Labels the x & y-axis
*/
static void _Label(void) {
  int x, y;
  GUI_SetBkColor(GUI_RED);
  GUI_Clear();
  GUI_SetColor(GUI_WHITE);
  GUI_SetFont(&GUI_Font24_ASCII);
  GUI_DispStringHCenterAt("MEMDEV_DrawGraph - Sample", 160, 5);
  GUI_SetPenSize(1);
  GUI_ClearRect(0, (LCD_YSIZE - 21) - YSIZE, (LCD_XSIZE - 1), (LCD_YSIZE - 1));
  GUI_DrawRect(18, (LCD_YSIZE - 21) - YSIZE, (LCD_XSIZE - 1), (LCD_YSIZE - 20));
  GUI_SetFont(&GUI_Font6x8);
  for (x = 0; x < (LCD_XSIZE - 20); x += 40) {
    int xPos = x + 18;
    GUI_DrawVLine(xPos, (LCD_YSIZE - 20), (LCD_YSIZE - 14));
    GUI_DispDecAt(x / 40, xPos - 2, (LCD_YSIZE - 9), 1);
  }
  for (y = 0; y < YSIZE / 2; y += 20) {
    int yPos = (LCD_YSIZE - 20) - YSIZE / 2 + y;
    GUI_DrawHLine(yPos, 13, 18);
    if (y) {
      GUI_GotoXY(1, yPos - 4);
      GUI_DispSDec(-y / 20, 2);
      yPos = (LCD_YSIZE - 20) - YSIZE / 2 - y;
      GUI_DrawHLine(yPos, 13, 18);
      GUI_GotoXY(1, yPos - 4);
      GUI_DispSDec(y / 20, 2);
    } else {
      GUI_DispCharAt('0', 7, yPos - 4);
    }
  }
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:37,代码来源:memdev_drawgraph.c


示例10: _DemoSineWave

/*******************************************************************
*
*       _DemoSineWave
*/
static void _DemoSineWave(void) {
  PARAM Param;
  I16 * pStart;
  int t0, Cnt = 0;
  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("Sine wave", 20, 55);
  pStart = GUI_ALLOC_h2p(hMem);
  _GetSineData(pStart, 405);
  GUI_SetFont(&GUI_Font6x8);
  t0 = GUI_GetTime();
  while((GUI_GetTime() - t0) < 10000) {
    int t1, tDiff2;
    if (Cnt++ % 90) {
      Param.aY++;
    } else {
      Param.aY = pStart;
    }
    t1 = GUI_GetTime();
    GUI_MEMDEV_Draw(&Rect, _Draw2, &Param, 0, 0);
    tDiff2 = GUI_GetTime() - t1;
    if (tDiff2 < 100) {
      GUI_Delay(100 - tDiff2);
    }
  }
  GUI_ALLOC_Free(hMem);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:35,代码来源:memdev_drawgraph.c


示例11: _DemoRandomGraph

/*******************************************************************
*
*       _DemoRandomGraph
*/
static void _DemoRandomGraph(void) {
  PARAM Param;
  int tDiff, t0;
  GUI_RECT Rect = {19, (LCD_YSIZE - 20) - YSIZE, (LCD_XSIZE - 2), (LCD_YSIZE - 21)};
  GUI_HMEM hMem = GUI_ALLOC_AllocZero((LCD_XSIZE - 20) * sizeof(I16));
  GUI_SetColor(GUI_WHITE);
  GUI_SetBkColor(GUI_RED);
  GUI_ClearRect(0, 55, LCD_XSIZE, 75);
  GUI_SetFont(&GUI_FontComic18B_1);
  GUI_DispStringAt("Random graph", 20, 55);
  GUI_Lock();
  Param.aY = GUI_ALLOC_h2p(hMem);
  GUI_SetFont(&GUI_Font6x8);
  t0 = GUI_GetTime();
  while((tDiff = (GUI_GetTime() - t0)) < 10000) {
    int t1, tDiff2;
    _GetRandomData(Param.aY, tDiff, (LCD_XSIZE - 20));
    t1 = GUI_GetTime();
    GUI_MEMDEV_Draw(&Rect, _Draw, &Param, 0, 0);
    tDiff2 = GUI_GetTime() - t1;
    if (tDiff2 < 100) {
      GUI_Delay(100 - tDiff2);
    }
  }
  GUI_Unlock();
  GUI_ALLOC_Free(hMem);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:31,代码来源:memdev_drawgraph.c


示例12: _Label

static void _Label(void) {
  int x, y;
  GUI_SetPenSize(1);
  GUI_ClearRect(0, (LCD_GetYSize() - 21) - _YSize, (LCD_GetXSize() - 1), (LCD_GetYSize() - 1));
  GUI_DrawRect(18, (LCD_GetYSize() - 21) - _YSize, (LCD_GetXSize() - 1), (LCD_GetYSize() - 20));
  GUI_SetFont(&GUI_Font6x8);
  for (x = 0; x < (LCD_GetXSize() - 20); x += 40) {
    int xPos = x + 18;
    GUI_DrawVLine(xPos, (LCD_GetYSize() - 20), (LCD_GetYSize() - 14));
    GUI_DispDecAt(x / 40, xPos - 2, (LCD_GetYSize() - 9), 1);
  }
  for (y = 0; y < _YSize / 2; y += 20) {
    int yPos = (LCD_GetYSize() - 20) - _YSize / 2 + y;
    GUI_DrawHLine(yPos, 13, 18);
    if (y) {
      GUI_GotoXY(1, yPos - 4);
      GUI_DispSDec(-y / 20, 2);
      yPos = (LCD_GetYSize() - 20) - _YSize / 2 - y;
      GUI_DrawHLine(yPos, 13, 18);
      GUI_GotoXY(1, yPos - 4);
      GUI_DispSDec(y / 20, 2);
    } else {
      GUI_DispCharAt('0', 7, yPos - 4);
    }
  }
}
开发者ID:agb861,项目名称:ddd,代码行数:26,代码来源:GUIDEMO_Graph.c


示例13: _Show

static void _Show(const char* s0, const char* s1) {
  GUIDEMO_SetColor(GUI_WHITE);
  #if (LCD_YSIZE < 160)
    GUI_SetFont(&GUI_Font8_ASCII);
  #else
    GUI_SetFont(&GUI_Font13B_ASCII);
  #endif
  GUI_DispString("\n");
  #if (LCD_YSIZE < 128)
    GUIDEMO_Delay(200);
    GUI_GotoXY(0, LCD_YSIZE / 2 - 6);
    GUI_ClearRect(0, 24, LCD_XSIZE - 1, LCD_YSIZE - 1);
    GUIDEMO_Delay(200);
  #endif
  GUI_DispString(s0);
  GUIDEMO_Delay(500);
  #if GUIDEMO_LARGE
    GUI_GotoX(110);
    GUIDEMO_SetColor(GUI_GREEN);
  #else
    GUI_GotoX(100);
    GUIDEMO_SetColor(GUI_BLUE);
  #endif
  #if (LCD_XSIZE < 320)
    GUI_DispString("\n");
    #if (LCD_XSIZE < 200)
      GUI_GotoX(10);
    #else
      GUI_GotoX(LCD_XSIZE / 6);
    #endif
  #endif
  GUI_DispString(s1);
  GUIDEMO_Delay(1500);
}
开发者ID:a-c-t-i-n-i-u-m,项目名称:HY-STM32F103,代码行数:34,代码来源:GUIDEMO_HardwareInfo.c


示例14: WM_InvalidateBWin1

/* Invalidate, using window coordinates */
static void WM_InvalidateBWin1(WM_HWIN hWin, const GUI_RECT*pRect) {
  GUI_RECT r;
  WM_Obj* pWin = WM_H2P(hWin);
  WM__GetClientRectWin(pWin, &r);
  if (pRect)
    GUI__IntersectRect(&r, pRect);
  if (WM__RectIsNZ(&r)) {
    if (pWin->Status & WM_SF_INVALID) {
      GUI_MergeRect(&pWin->InvalidRect, &pWin->InvalidRect, &r);
    } else {
      pWin->InvalidRect = r;
      pWin->Status |= WM_SF_INVALID;
      WM__NumInvalidWindows++;
      /* Debug code: shows invalid areas */
      #if (WM_SHOW_INVALID)
      {
        GUI_CONTEXT Context = GUI_Context;
        WM_SelectWindow(hWin);
        GUI_SetBkColor(GUI_GREEN);
        GUI_ClearRect(r.x0, r.y0, r.x1, r.y1);
        GUI_Context = Context;
      }
      #endif


    }
  }
}
开发者ID:uKingSky,项目名称:KingSky,代码行数:29,代码来源:wm.c


示例15: _LabelGraph

/*********************************************************************
*
*       _LabelGraph
*/
static void _LabelGraph(void) {
  GUI_RECT Rect;
  int      x;
  int      y;
  int      xSize;
  int      ySize;

  WM_GetClientRect(&Rect);
  xSize = Rect.x1;
  ySize = Rect.y1;
  GUI_SetBkColor(_ColorBackGround);
  GUI_Clear();
  GUI_SetColor(_ColorLabel);
  GUI_SetPenSize(1);
  GUI_ClearRect(0, (ySize - 21) - ySize, (xSize - 1), (ySize - 1));
  GUI_DrawRect(25, 0, xSize, ySize - 20);
  GUI_SetFont(&GUI_Font6x8);
  for (x = 0; x < (xSize - 20); x += 40) {
    int xPos = x + 25;
    GUI_DrawVLine(xPos, (ySize - 20), (ySize - 14));
    GUI_DispDecAt(x / 40, xPos - 2, (ySize - 9), 1);
  }
  for (y = 0; y < ySize - 20; y += 20) {
    int yPos = ySize - 20 - y;
    GUI_DrawHLine(yPos, 20, 25);
    GUI_GotoXY(1, yPos - 4);
    GUI_DispDecSpace(_TempMin + y, 3);
  }
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:33,代码来源:VSCREEN_RealTime.c


示例16: _DrawGraph

/*******************************************************************
*
*       _DrawGraph
*/
static void _DrawGraph(void) {
  GUI_RECT Rect;
  int      xSize;
  int      ySize;
  int      x;
  int      y;

  WM_GetClientRect(&Rect);
  xSize = Rect.x1;
  ySize = Rect.y1;
  GUI_SetBkColor(GUI_BLACK);
  GUI_ClearRect(26, 1, 302, ySize - 21);
  GUI_SetColor(_ColorGrid);
  for (y = 20; y < (ySize - 21); y += 20) {
    int yPos = ySize - 20 - y;
    GUI_DrawHLine(yPos, 26, 302);
  }
  for (x = 40; x < (xSize - 25); x += 40) {
    int xPos = x + 25;
    GUI_DrawVLine(xPos, 1, ySize - 21);
  }
  GUI_SetColor(_ColorTemp1);
  GUI_DrawGraph(_aTemp1, GUI_COUNTOF(_aTemp1), 26, ySize - 121);
  GUI_SetColor(_ColorTemp2);
  GUI_DrawGraph(_aTemp2, GUI_COUNTOF(_aTemp2), 26, ySize - 121);
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:30,代码来源:VSCREEN_RealTime.c


示例17: _Draw

/*******************************************************************
*
*       _Draw

  This function draws the non high resolution pointer
*/
static void _Draw(void * p) {
  PARAM * pParam = (PARAM *)p;
  if (pParam->AutoInfo.DrawFixed) {
    GUI_ClearRect(160, 60, 259, 159);
  }
  GUI_AA_FillPolygon(pParam->aPoints, countof(_aPointer), 165, 155);
}
开发者ID:qiurenguo2014,项目名称:youjiesun,代码行数:13,代码来源:AA_HiResAntialiasing.c


示例18: TxtLayer_ClearTxtItem

__u32  TxtLayer_ClearTxtItem(txtlayer_man_t *ptxtlayer,__u32 x,__u32 y)
{
   #if 0
   void *               base;
   __u32                bpp;
   __u32                size;
    
   bpp  = TxtLayer_GetBPP(ptxtlayer);

   size = (ptxtlayer->txtlist->head->rect.width * 
            ptxtlayer->txtlist->head->rect.height * ptxtlayer->txtlist->bpp + 7)/8;
   
   
   base = (void *)((__u32)ptxtlayer->txtbuffer->buffer + 
            (ptxtlayer->txtbuffer->rectsz.width * y *bpp + 7)/8 + 
            (x * bpp +7)/8);
   
   eLIBs_memset(base, 0x00, size);
  #else
    GUI_LyrWinSel(ptxtlayer->layer);
    GUI_SetBkColor(ptxtlayer->bk_color);
    GUI_ClearRect(x,y,x + ptxtlayer->txtbuffer->rectsz.width - 1,y + ptxtlayer->txtlist->head->rect.height - 1);
  #endif
   
   return 0;
}
开发者ID:silview,项目名称:C100A,代码行数:26,代码来源:txtlayer.c


示例19: _DemoListBox

/*******************************************************************
*
*       _DemoListBox
*/
static void _DemoListBox(void) {
  int            i;
  int            Entries;
  int            ySize;
  LISTBOX_Handle hListBox;
  
  Entries = GUI_COUNTOF(_ListBox) - 1;
  ySize   = GUI_GetYDistOfFont(&GUI_Font13B_1) * Entries;
  //
  // Create the listbox
  //
  hListBox = LISTBOX_Create(_ListBox, 130, 80, 60, ySize, WM_CF_SHOW);
  //
  // Change current selection of the listbox
  //
  for (i = 0; i < Entries-1; i++) {
    GUI_Delay(500);
    LISTBOX_IncSel(hListBox);
    WM_ExecIdle();
	}
  for (i = 0; i < Entries-1; i++) {
    GUI_Delay(500);
    LISTBOX_DecSel(hListBox);
    WM_ExecIdle();
	}
  GUI_Delay(750);
  //
  // Delete listbox widget
  //
  LISTBOX_Delete(hListBox);
  GUI_ClearRect(0, 50, 319, 239);
  GUI_Delay(750);
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:37,代码来源:WIDGET_SimpleListBox.c


示例20: _Draw

/********************************************************************
*
*       _Draw
*
* Function description
*   Draws some coloured output to the current device (display or memory device)
*/
static void _Draw(void) {
  int i;
  GUI_SetBkColor(GUI_YELLOW);
  GUI_ClearRect(0, 75, 319, 138);
  GUI_SetColor(GUI_RED);
  GUI_SetFont(&GUI_Font32B_ASCII);
  GUI_DispStringHCenterAt("Printing demo", 160, 75);
  for (i = 0; i < 12; i += 2) {
    GUI_SetColor(GUI_GREEN);
    GUI_DrawRect(5 + i, 80 + i, 50 - i, 101 - i);
    GUI_SetColor(GUI_BLUE);
    GUI_DrawRect(269 + i, 80 + i, 314 - i, 101 - i);
  }
  for (i = 0; i < 32; i += 8) {
    GUI_SetColor(GUI_BLUE);
    GUI_FillRect(0, 107 + i, 319, 110 + i);
    GUI_SetColor(GUI_YELLOW);
    GUI_FillRect(0, 111 + i, 319, 114 + i);
  }
  i = 8;
  _DrawBitmap(&bmTestPicture1, i +   0, 111, 0, 0);
  _DrawBitmap(&bmTestPicture1, i +  35, 111, 1, 0);
  _DrawBitmap(&bmTestPicture1, i +  70, 111, 0, 1);
  _DrawBitmap(&bmTestPicture2, i + 105, 111, 0, 0);
  _DrawBitmap(&bmTestPicture2, i + 140, 111, 1, 0);
  _DrawBitmap(&bmTestPicture4, i + 175, 111, 0, 0);
  _DrawBitmap(&bmTestPicture4, i + 210, 111, 1, 0);
  _DrawBitmap(&bmTestPicture8, i + 245, 111, 0, 0);
  _DrawBitmap(&bmTestPicture8, i + 280, 111, 1, 0);
}
开发者ID:caicry,项目名称:uFrame,代码行数:37,代码来源:MEMDEV_Printing.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GUI_CreateDialogBox函数代码示例发布时间:2022-05-30
下一篇:
C++ GUI_Clear函数代码示例发布时间: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