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

📄 gui_drawgraph.lst

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


C51 COMPILER V8.05a, COMPILATION OF MODULE GUI_DRAWGRAPH
OBJECT MODULE PLACED IN GUI_DrawGraph.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\GUI_DrawGraph.c LARGE BROWSE MDU_F120 DEBUG OBJECTEX
                    -TEND PRINT(.\GUI_DrawGraph.lst) OBJECT(GUI_DrawGraph.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_DrawPolyline.c
  16          Purpose     : Implementation of GUI_DrawPolyline (part of emWin GSC)
  17          ---------------------------END-OF-HEADER------------------------------
  18          */
  19          
  20          #include <stddef.h>           /* needed for definition of NULL */
  21          #include "gui\Core\GUI_Protected.h"
  22          
  23          static void _DrawGraph(I16 *pay, int NumPoints, int xOff, int yOff) {
  24   1        int i;
  25   1        int y0, y1;
  26   1        int yClip0, yClip1;
  27   1        /* Perform high level clipping in x */
  28   1        yClip0 = GUI_Context.pClipRect_HL->y0;
  29   1        yClip1 = GUI_Context.pClipRect_HL->y1;
  30   1        i=0;
  31   1        if (GUI_Context.pClipRect_HL) {
  32   2          if (xOff < GUI_Context.pClipRect_HL->x0)
  33   2            i = GUI_Context.pClipRect_HL->x0 - xOff;
  34   2          if (xOff+NumPoints-1 > GUI_Context.pClipRect_HL->x1)
  35   2            NumPoints = GUI_Context.pClipRect_HL->x1 - xOff + 1;
  36   2        }
  37   1        /* Start drawing if there is something left to do after x-clipping */
  38   1        if (i < NumPoints) {
  39   2          y0 = *(pay + i++) + yOff;
  40   2          /* Iterate */
  41   2          for (; i < NumPoints; i++) {
  42   3            /* Perform high level clipping in y */
  43   3            y1 = *(pay + i) + yOff;
  44   3            if ((y0 >= yClip0) | (y1 >= yClip0)) {
  45   4              if ((y0 <= yClip1) | (y1 <= yClip1)) {
  46   5                int y01;
  47   5                y01 = (y1 + y0) / 2;
  48   5                if (y0 <= y1) {
  49   6                  LCD_DrawVLine(i + xOff - 1, y0, y01);
  50   6                  LCD_DrawVLine(i + xOff, y01, y1);
  51   6                } else {
  52   6                  LCD_DrawVLine(i + xOff - 1, y01, y0);
  53   6                  LCD_DrawVLine(i + xOff, y1, y01);
  54   6                }
C51 COMPILER V8.05a   GUI_DRAWGRAPH                                                        04/11/2008 14:18:36 PAGE 2   

  55   5              }
  56   4            }
  57   3            y0 = y1;
  58   3          }
  59   2        }
  60   1      }
  61            
  62          void GUI_DrawGraph(I16 *pay, int NumPoints, int x0, int y0) {
  63   1        GUI_LOCK();
  64   1        #if (GUI_WINSUPPORT)
                  WM_ADDORG(x0,y0);
                  WM_ITERATE_START(NULL); {
                #endif
  68   1        _DrawGraph(pay, NumPoints, x0, y0);
  69   1        #if (GUI_WINSUPPORT)
                  } WM_ITERATE_END();
                #endif
  72   1        GUI_UNLOCK();
  73   1      }
  74          
  75          
  76          
  77          
  78          
  79          
  80          
  81          
  82          


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