2 * PROJECT: ReactOS win32 kernel mode subsystem
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: win32ss/gdi/ntgdi/rect.c
5 * PURPOSE: Rect functions
6 * PROGRAMMER: Timo Kreuzer
14 /* FUNCTIONS *****************************************************************/
20 _In_
const RECTL
*prcl1
,
21 _In_
const RECTL
*prcl2
)
23 if (RECTL_bIsEmptyRect(prcl1
))
25 if (RECTL_bIsEmptyRect(prcl2
))
27 RECTL_vSetEmptyRect(prclDst
);
37 if (RECTL_bIsEmptyRect(prcl2
))
43 prclDst
->left
= min(prcl1
->left
, prcl2
->left
);
44 prclDst
->top
= min(prcl1
->top
, prcl2
->top
);
45 prclDst
->right
= max(prcl1
->right
, prcl2
->right
);
46 prclDst
->bottom
= max(prcl1
->bottom
, prcl2
->bottom
);
57 _In_
const RECTL
* prcl1
,
58 _In_
const RECTL
* prcl2
)
60 prclDst
->left
= max(prcl1
->left
, prcl2
->left
);
61 prclDst
->right
= min(prcl1
->right
, prcl2
->right
);
63 if (prclDst
->left
< prclDst
->right
)
65 prclDst
->top
= max(prcl1
->top
, prcl2
->top
);
66 prclDst
->bottom
= min(prcl1
->bottom
, prcl2
->bottom
);
68 if (prclDst
->top
< prclDst
->bottom
)
74 RECTL_vSetEmptyRect(prclDst
);
81 RECTL_vMakeWellOrdered(
85 if (prcl
->left
> prcl
->right
)
88 prcl
->left
= prcl
->right
;
91 if (prcl
->top
> prcl
->bottom
)
94 prcl
->top
= prcl
->bottom
;