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

📄 guiaapoly.lst

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


C51 COMPILER V8.05a, COMPILATION OF MODULE GUIAAPOLY
OBJECT MODULE PLACED IN GUIAAPoly.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\AntiAlias\GUIAAPoly.c LARGE BROWSE MDU_F120 DEBUG OBJECTE
                    -XTEND PRINT(.\GUIAAPoly.lst) OBJECT(GUIAAPoly.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        : GUIPolyAA.C
  16          Purpose     : Draw Polygon routines with Antialiasing
  17          ---------------------------END-OF-HEADER------------------------------
  18          */
  19          
  20          #include "gui\Core\GUI_Private.h"
  21          
  22          #include <stdio.h>
  23          #include <string.h>
  24          #include <math.h>
  25          
  26          
  27          /*
  28                    **********************************************
  29                    *                                            *
  30                    *              GL_FillPolygonAA              *
  31                    *                                            *
  32                    **********************************************
  33          */
  34          static void _FillPolygonAA      (GUI_POINT* paPoint, int NumPoints, int x, int y) {
  35   1        int i;
  36   1        int Stat;
  37   1        int x0,x1;
  38   1        int PosFactor = GUI_Context.AA_HiResEnable ? 1 : GUI_Context.AA_Factor;
  39   1      /* Calc horizontal limits and init GUI_AA */
  40   1        x0 = x1 = paPoint[0].x;
  41   1        for (i=1; i< NumPoints; i++) {
  42   2          int x =  paPoint[i].x;
  43   2          if (x<x0)
  44   2            x0 = x;
  45   2          if (x>x1)
  46   2            x1 = x;
  47   2        }
  48   1        if (!GUI_Context.AA_HiResEnable) {
  49   2          Stat = GUI_AA_Init(x0+x,x1+x);
  50   2        } else {
  51   2          Stat = GUI_AA_Init((x0+x)/GUI_Context.AA_Factor,(x1+x)/GUI_Context.AA_Factor);
  52   2        }
  53   1        if (Stat ==0) {
  54   2          /* Modify pointlist */
C51 COMPILER V8.05a   GUIAAPOLY                                                            04/11/2008 14:18:19 PAGE 2   

  55   2          if (!GUI_Context.AA_HiResEnable) {
  56   3            for (i=0; i< NumPoints; i++) {
  57   4              paPoint[i].x *= GUI_Context.AA_Factor;
  58   4              paPoint[i].y *= GUI_Context.AA_Factor;
  59   4            }
  60   3          }
  61   2          GL_FillPolygon(paPoint, NumPoints, x * PosFactor, y * PosFactor);
  62   2          /* Restore pointlist */
  63   2          if (!GUI_Context.AA_HiResEnable) {
  64   3            for (i=0; i< NumPoints; i++) {
  65   4              paPoint[i].x /= GUI_Context.AA_Factor;
  66   4              paPoint[i].y /= GUI_Context.AA_Factor;
  67   4            }
  68   3          }
  69   2          /* Cleanup */
  70   2        }
  71   1        GUI_AA_Exit();
  72   1      }
  73          
  74          void GUI_AA_FillPolygon(/*const*/ GUI_POINT* pPoints, int NumPoints, int x0, int y0) {
  75   1        GUI_LOCK();
  76   1        #if (GUI_WINSUPPORT)
                  WM_ADDORG_AA(x0,y0);
                  WM_ITERATE_START(NULL); {
                #endif
  80   1      /* Variables in MEMDEV module (with memory devices only) */
  81   1        #if GUI_SUPPORT_MEMDEV
                  if (GUI_Context.pDeviceAPI->pfFillPolygonAA)
                    GUI_Context.pDeviceAPI->pfFillPolygonAA(pPoints, NumPoints, x0, y0);
                  else
                #endif
  86   1        _FillPolygonAA (pPoints, NumPoints, x0, y0);
  87   1        #if (GUI_WINSUPPORT)
                  } WM_ITERATE_END();
                #endif
  90   1        GUI_UNLOCK();
  91   1      }
  92          
  93          
  94          
  95          
  96          
  97          
  98          


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