ReactOS  0.4.14-dev-583-g2a1ba2c
rect.h
Go to the documentation of this file.
1 #pragma once
2 
4 VOID
7  _In_ LONG left,
8  _In_ LONG top,
11 {
12  prcl->left = left;
13  prcl->top = top;
14  prcl->right = right;
15  prcl->bottom = bottom;
16 }
17 
19 VOID
21  _Out_ RECTL *prcl)
22 {
23  prcl->left = 0;
24  prcl->top = 0;
25  prcl->right = 0;
26  prcl->bottom = 0;
27 }
28 
30 VOID
33  _In_ INT cx,
34  _In_ INT cy)
35 {
36  prcl->left += cx;
37  prcl->right += cx;
38  prcl->top += cy;
39  prcl->bottom += cy;
40 }
41 
43 BOOL
45  _In_ const RECTL *prcl)
46 {
47  return (prcl->left >= prcl->right || prcl->top >= prcl->bottom);
48 }
49 
51 BOOL
53  _In_ const RECTL *prcl,
54  _In_ INT x,
55  _In_ INT y)
56 {
57  return (x >= prcl->left && x < prcl->right &&
58  y >= prcl->top && y < prcl->bottom);
59 }
60 
62 BOOL
64  _In_ const RECTL *prcl)
65 {
66  return ((prcl->left <= prcl->right) &&
67  (prcl->top <= prcl->bottom));
68 }
69 
71 BOOL
74  _In_ const RECTL *prclSrc,
75  _In_ const SIZEL *pszl)
76 {
77  prclDst->left = max(prclSrc->left, 0);
78  prclDst->top = max(prclSrc->top, 0);
79  prclDst->right = min(prclSrc->right, pszl->cx);
80  prclDst->bottom = min(prclSrc->bottom, pszl->cy);
81  return !RECTL_bIsEmptyRect(prclDst);
82 }
83 
84 BOOL
88  _In_ const RECTL *prcl1,
89  _In_ const RECTL *prcl2);
90 
91 BOOL
95  _In_ const RECTL* prcl1,
96  _In_ const RECTL* prcl2);
97 
98 VOID
101  _Inout_ RECTL *prcl);
102 
103 VOID
104 FASTCALL
106  _Inout_ RECTL *rect,
107  _In_ INT dx,
108  _In_ INT dy);
#define max(a, b)
Definition: svc.c:63
VOID FASTCALL RECTL_vInflateRect(_Inout_ RECTL *rect, _In_ INT dx, _In_ INT dy)
Definition: rect.c:101
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
GLint dy
Definition: linetemp.h:97
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
FORCEINLINE BOOL RECTL_bClipRectBySize(_Out_ RECTL *prclDst, _In_ const RECTL *prclSrc, _In_ const SIZEL *pszl)
Definition: rect.h:72
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
#define FORCEINLINE
Definition: ntbasedef.h:221
#define _Out_
Definition: no_sal2.h:323
GLint GLint bottom
Definition: glext.h:7726
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
Definition: winddi.h:3414
GLint left
Definition: glext.h:7726
#define _Inout_
Definition: no_sal2.h:244
GLdouble GLdouble right
Definition: glext.h:10859
FORCEINLINE BOOL RECTL_bPointInRect(_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
Definition: rect.h:52
#define _In_
Definition: no_sal2.h:204
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
Definition: rect.h:31
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
Definition: rect.c:81
FORCEINLINE VOID RECTL_vSetRect(_Out_ RECTL *prcl, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
Definition: rect.h:5
FORCEINLINE BOOL RECTL_bIsWellOrdered(_In_ const RECTL *prcl)
Definition: rect.h:63
#define min(a, b)
Definition: monoChain.cc:55
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
_Out_opt_ int * cx
Definition: commctrl.h:581
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4190
BOOL FASTCALL RECTL_bUnionRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:18
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:55