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

📄 lcdrle4.lst

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


C51 COMPILER V8.05a, COMPILATION OF MODULE LCDRLE4
OBJECT MODULE PLACED IN LCDRLE4.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\LCDRLE4.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXTEND P
                    -RINT(.\LCDRLE4.lst) OBJECT(LCDRLE4.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        : LCDRLE4.c
  16          Purpose     : Drawing routines for run length encoded bitmaps
  17                        with 4bpp
  18          ---------------------------END-OF-HEADER------------------------------
  19          */
  20          
  21          #include <stddef.h>           /* needed for definition of NULL */
  22          #include "gui\Core\LCD.h"
  23          #include "gui\Core\GUI_Private.h"
  24          
  25          #ifndef __C51__ /* Avoid Keil C51 limitation */
              
              void LCD_DrawBitmap_RLE4(int x0,int y0,int xsize, int ysize, const U8*pPixel, const LCD_LOGPALETTE* pLogPa
             -l, int xMag, int yMag) {
                const LCD_PIXELINDEX* pTrans =NULL;
                char NoTrans = !(GUI_Context.DrawMode & LCD_DRAWMODE_TRANS);
                LCD_PIXELINDEX aColorIndex[2];
                LCD_PIXELINDEX PixelIndex;
                int xi,y;
                int xL, yL;
                char IsMagnified = ((yMag | xMag) != 1);
                aColorIndex[0] = LCD_ACOLORINDEX[0];
                aColorIndex[1] = LCD_ACOLORINDEX[1];
                /* Handle color translation */
                if ((pLogPal) && (pLogPal->pPalEntries)) {
                  if ((pTrans = LCD_GetpPalConvTable(pLogPal)) == NULL) {
                    return;
                  }
                }
               /* Check if we can limit the number of lines due to clipping) */
                if (yMag == 1) {
                  if (ysize > GUI_Context.ClipRect.y1 - y0 + 1)
                    ysize = GUI_Context.ClipRect.y1 - y0 + 1;
                }
                /* Repeat until we have reached bottom */
                for (xi=0, y = 0; y < ysize; ) {
                  U8 Cmd,Data;
                  Cmd= *pPixel++;
                  Data = *pPixel++;
                  if (Cmd) {
C51 COMPILER V8.05a   LCDRLE4                                                              04/11/2008 14:19:05 PAGE 2   

                    LCD_SetColorIndex(pTrans ? *(pTrans+Data) : Data);
                    while (Cmd) {
                      int xi1 = xi+Cmd;
                      if (xi1>=xsize)
                        xi1 = xsize;
                      Cmd -= (xi1-xi);
                      if (Data || NoTrans) {  /* Skip transparent pixels */
                        if (IsMagnified) {
                          xL = xMag * xi + x0;
                          yL = yMag * y + y0;
                          LCD_FillRect(xL, yL, xL + xMag * (xi1 - xi) -1 , yL + yMag - 1);
                        } else {
                          LCD_DrawHLine(x0+xi, y + y0, xi1+x0-1);
                        }
                      }
                      xi =xi1;
                      if (xi1==xsize) {
                        y++;
                        xi=0;
                      }
                    }
                  } else {
                    while (Data--) {
                      U8 Index = *pPixel++;
                      if ((Index>>4) || NoTrans) {  /* Skip transparent pixels */
                        PixelIndex = pTrans ? *(pTrans+(Index>>4)) : (Index>>4);
                        if (IsMagnified) {
                          LCD_SetColorIndex(PixelIndex);
                          xL = xMag * xi + x0;
                          yL = yMag * y + y0;
                          LCD_FillRect(xL, yL, xL + xMag -1 , yL + yMag - 1);
                        } else {
                          LCD_SetPixelIndex(x0+xi, y + y0, PixelIndex);
                        }
                      }
                      if (++xi >= xsize) {
                        xi=0; y++;
                      }
                      if (Data-- == 0)
                        break;
                      if ((Index&15) || NoTrans) {  /* Skip transparent pixels */
                        PixelIndex = pTrans ? *(pTrans+(Index&15)) : (Index&15);
                        if (IsMagnified) {
                          LCD_SetColorIndex(PixelIndex);
                          xL = xMag * xi + x0;
                          yL = yMag * y + y0;
                          LCD_FillRect(xL, yL, xL + xMag -1 , yL + yMag - 1);
                        } else {
                          LCD_SetPixelIndex(x0+xi, y + y0, PixelIndex);
                        }
                      }
                      if (++xi >= xsize) {
                        xi=0; y++;
                      }
                    }
                  }
                }
                LCD_ACOLORINDEX[0] = aColorIndex[0];
                LCD_ACOLORINDEX[1] = aColorIndex[1];
              }
              
              #endif
C51 COMPILER V8.05a   LCDRLE4                                                              04/11/2008 14:19:05 PAGE 3   

 116          
 117          
 118          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   ----    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   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 + -