📄 gui__intersectrects.lst
字号:
C51 COMPILER V8.05a GUI__INTERSECTRECTS 04/11/2008 14:18:25 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE GUI__INTERSECTRECTS
OBJECT MODULE PLACED IN GUI__IntersectRects.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\GUI__IntersectRects.c LARGE BROWSE MDU_F120 DEBUG OB
-JECTEXTEND PRINT(.\GUI__IntersectRects.lst) OBJECT(GUI__IntersectRects.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_IntersectRects.c
16 Purpose : Implementation of GUI_IntersectRects
17 ---------------------------END-OF-HEADER------------------------------
18 */
19
20
21 #include "gui\Core\GUI_Protected.h"
22
23 /*********************************************************************
24 *
25 * Macros
26 *
27 ********************************************************************
28 */
29
30 #define MIN(v0,v1) ((v0>v1) ? v1 : v0)
31 #define MAX(v0,v1) ((v0>v1) ? v0 : v1)
32
33 /*********************************************************************
34 *
35 * GUI__IntersectRects
36 *
37 **********************************************************************
38 Purpose:
39 Calc intersection of rectangles
40 Return value:
41 1 if they do intersect,
42 0 if there is no intersection
43 Add. info:
44 Rectangles are passed as pointers. These pointers need to be valid;
45 a NULL pointer may not be passed. There is no check for NULL pointers
46 implemented in order to avoid avoid performance penalty.
47 */
48
49 int GUI__IntersectRects(GUI_RECT* pDest, const GUI_RECT* pr0, const GUI_RECT* pr1) {
50 1 pDest->x0 = MAX (pr0->x0, pr1->x0);
51 1 pDest->y0 = MAX (pr0->y0, pr1->y0);
52 1 pDest->x1 = MIN (pr0->x1, pr1->x1);
53 1 pDest->y1 = MIN (pr0->y1, pr1->y1);
54 1 if (pDest->x1 < pDest->x0)
C51 COMPILER V8.05a GUI__INTERSECTRECTS 04/11/2008 14:18:25 PAGE 2
55 1 return 0;
56 1 if (pDest->y1 < pDest->y0)
57 1 return 0;
58 1 return 1;
59 1 }
60
61
62
63
64
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 468 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- 9
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 + -