⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui_drawbitmap.lst

📁 Keil C下通过的UCGUI,UCGUI的移植源代码
💻 LST
字号:
C51 COMPILER V8.05a   GUI_DRAWBITMAP                                                       04/11/2008 14:18:35 PAGE 1   


C51 COMPILER V8.05a, COMPILATION OF MODULE GUI_DRAWBITMAP
OBJECT MODULE PLACED IN GUI_DrawBitmap.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\GUI_DrawBitmap.c LARGE BROWSE MDU_F120 DEBUG OBJECTE
                    -XTEND PRINT(.\GUI_DrawBitmap.lst) OBJECT(GUI_DrawBitmap.obj)

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/GUI
   4          *                        Universal graphic software for embedded applications
   5          *
   6          *                       (c) Copyright 2002, Micrium Inc., Weston, FL
   7          *                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
   8          *
   9          *              礐/GUI is protected by international copyright laws. Knowledge of the
  10          *              source code may not be used to write a similar product. This file may
  11          *              only be used in accordance with a license and should not be redistributed
  12          *              in any way. We appreciate your understanding and fairness.
  13          *
  14          ----------------------------------------------------------------------
  15          File        : GUI_DrawBitmap.C
  16          Purpose     : Implementation of GUI_DrawBitmap
  17          ---------------------------END-OF-HEADER------------------------------
  18          */
  19          
  20          #include <stddef.h>
  21          #include "gui\Core\GUI_Private.h"
  22          
  23          /*********************************************************************
  24          *
  25          *             GUI_DrawBitmap
  26          *
  27          **********************************************************************
  28          
  29            Translates the external bitmap format into an internal
  30            format. This turned out to be necessary as the internal
  31            format is easier to create and more flexible for routines
  32            that draw text-bitmaps.
  33          */
  34          
  35          
  36          void GL_DrawBitmap   (const GUI_BITMAP *pBitmap, int x0, int y0) {
  37   1        GUI_DRAWMODE PrevDraw;
  38   1        const GUI_LOGPALETTE* pPal;
  39   1        pPal = pBitmap->pPal;
  40   1        PrevDraw = GUI_SetDrawMode(0);  /* No Get... at this point */
  41   1        GUI_SetDrawMode((pPal && pPal->HasTrans) ? (PrevDraw|GUI_DRAWMODE_TRANS) : PrevDraw &(~GUI_DRAWMODE_TRAN
             -S));
  42   1        if (pBitmap->pfDraw) {
  43   2          #if !defined (__C51__)  /* Avoid Keil C51 limitation */
                    pBitmap->pfDraw(x0, y0, pBitmap->XSize ,pBitmap->YSize, (U8 const *)pBitmap->pData, pBitmap->pPal, 1
             -, 1);
                  #endif
  46   2        } else {
  47   2          const LCD_PIXELINDEX* pTrans;
  48   2          pTrans = LCD_GetpPalConvTable(pBitmap->pPal);
  49   2          if (!pTrans) {
  50   3            pTrans = (pBitmap->BitsPerPixel != 1) ? NULL : &LCD_BKCOLORINDEX;
  51   3          }
  52   2          LCD_DrawBitmap( x0,y0
C51 COMPILER V8.05a   GUI_DRAWBITMAP                                                       04/11/2008 14:18:35 PAGE 2   

  53   2                          ,pBitmap->XSize ,pBitmap->YSize
  54   2                          ,1,1
  55   2                          ,pBitmap->BitsPerPixel
  56   2                          ,pBitmap->BytesPerLine
  57   2                          ,(U8 const *)pBitmap->pData
  58   2                          ,pTrans);
  59   2        }
  60   1        GUI_SetDrawMode(PrevDraw);
  61   1      }
  62          
  63          void GUI_DrawBitmap   (const GUI_BITMAP  *pBitmap, int x0, int y0) {
  64   1        #if (GUI_WINSUPPORT)
                  GUI_RECT r;
                #endif
  67   1        GUI_LOCK();
  68   1        #if (GUI_WINSUPPORT)
                  WM_ADDORG(x0,y0);
                  r.x1 = (r.x0 = x0) + pBitmap->XSize-1;
                  r.y1 = (r.y0 = y0) + pBitmap->YSize-1;
                  WM_ITERATE_START(&r) {
                #endif
  74   1        GL_DrawBitmap(pBitmap, x0, y0);
  75   1        #if (GUI_WINSUPPORT)
                  } WM_ITERATE_END();
                #endif
  78   1        GUI_UNLOCK();
  79   1      }
  80          
  81          
  82          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    399    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----      22
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -