ReactOS 0.4.15-dev-7788-g1ad9096
rect.c File Reference
#include <win32k.h>
#include <debug.h>
Include dependency graph for rect.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOL FASTCALL RECTL_bUnionRect (_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
 
BOOL FASTCALL RECTL_bIntersectRect (_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
 
VOID FASTCALL RECTL_vMakeWellOrdered (_Inout_ RECTL *prcl)
 
VOID FASTCALL RECTL_vInflateRect (_Inout_ RECTL *rect, _In_ INT dx, _In_ INT dy)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file rect.c.

Function Documentation

◆ RECTL_bIntersectRect()

BOOL FASTCALL RECTL_bIntersectRect ( _Out_ RECTL prclDst,
_In_ const RECTL prcl1,
_In_ const RECTL prcl2 
)

Definition at line 55 of file rect.c.

59{
60 prclDst->left = max(prcl1->left, prcl2->left);
61 prclDst->right = min(prcl1->right, prcl2->right);
62
63 if (prclDst->left < prclDst->right)
64 {
65 prclDst->top = max(prcl1->top, prcl2->top);
66 prclDst->bottom = min(prcl1->bottom, prcl2->bottom);
67
68 if (prclDst->top < prclDst->bottom)
69 {
70 return TRUE;
71 }
72 }
73
75
76 return FALSE;
77}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4193

Referenced by AddPenLinesBounds(), co_IntFixCaret(), co_UserGetUpdateRect(), EngAlphaBlend(), EngBitBlt(), EngCopyBits(), EngMaskBitBlt(), EngStretchBltROP(), EngTransparentBlt(), get_valid_rects(), IntBeginPaint(), IntEngBitBlt(), IntEngGradientFillRect(), IntEngGradientFillTriangle(), IntEngMaskBlt(), IntEngStretchBlt(), IntEngTransparentBlt(), IntFillWindow(), IntGetMonitorsFromRect(), IntIntersectWithParents(), IntIsWindowFullscreen(), IntScrollWindowEx(), IntUpdateLayeredWindowI(), MENU_ShowPopup(), RECTL_Intersect(), SpiGetSet(), and UserScrollDC().

◆ RECTL_bUnionRect()

BOOL FASTCALL RECTL_bUnionRect ( _Out_ RECTL prclDst,
_In_ const RECTL prcl1,
_In_ const RECTL prcl2 
)

Definition at line 18 of file rect.c.

22{
23 if (RECTL_bIsEmptyRect(prcl1))
24 {
25 if (RECTL_bIsEmptyRect(prcl2))
26 {
28 return FALSE;
29 }
30 else
31 {
32 *prclDst = *prcl2;
33 }
34 }
35 else
36 {
37 if (RECTL_bIsEmptyRect(prcl2))
38 {
39 *prclDst = *prcl1;
40 }
41 else
42 {
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);
47 }
48 }
49
50 return TRUE;
51}
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44

Referenced by AddPenLinesBounds(), IntUpdateBoundsRect(), NtGdiSetBoundsRect(), and REGION_bXformRgn().

◆ RECTL_vInflateRect()

VOID FASTCALL RECTL_vInflateRect ( _Inout_ RECTL rect,
_In_ INT  dx,
_In_ INT  dy 
)

◆ RECTL_vMakeWellOrdered()