ReactOS  0.4.14-dev-57-g333b8f1
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 max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
#define min(a, b)
Definition: monoChain.cc:55
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4190

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(), IntScrollWindowEx(), IntUpdateLayeredWindowI(), MENU_ShowPopup(), RECTL_Intersect(), 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 }
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
#define min(a, b)
Definition: monoChain.cc:55
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4190

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()

VOID FASTCALL RECTL_vMakeWellOrdered ( _Inout_ RECTL prcl)

Definition at line 81 of file rect.c.

83 {
84  LONG lTmp;
85  if (prcl->left > prcl->right)
86  {
87  lTmp = prcl->left;
88  prcl->left = prcl->right;
89  prcl->right = lTmp;
90  }
91  if (prcl->top > prcl->bottom)
92  {
93  lTmp = prcl->top;
94  prcl->top = prcl->bottom;
95  prcl->bottom = lTmp;
96  }
97 }
long LONG
Definition: pedump.c:60
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529

Referenced by EngAlphaBlend(), EngBitBlt(), IntEngBitBlt(), NtGdiExcludeClipRect(), NtGdiSetBoundsRect(), REGION_bXformRgn(), and UserDrawCaption().