ReactOS 0.4.15-dev-8393-g61b7fb9
rect.h
Go to the documentation of this file.
1#pragma once
2
11{
12 prcl->left = left;
13 prcl->top = top;
14 prcl->right = right;
15 prcl->bottom = bottom;
16}
17
19VOID
22{
23 prcl->left = 0;
24 prcl->top = 0;
25 prcl->right = 0;
26 prcl->bottom = 0;
27}
28
30VOID
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
43BOOL
45 _In_ const RECTL *prcl)
46{
47 return (prcl->left >= prcl->right || prcl->top >= prcl->bottom);
48}
49
51BOOL
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
62BOOL
64 _In_ const RECTL *prcl)
65{
66 return ((prcl->left <= prcl->right) &&
67 (prcl->top <= prcl->bottom));
68}
69
71BOOL
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);
82}
83
85LONG
87{
88 return prcl->bottom - prcl->top;
89}
90
92LONG
94{
95 return prcl->right - prcl->left;
96}
97
98BOOL
102 _In_ const RECTL *prcl1,
103 _In_ const RECTL *prcl2);
104
105BOOL
109 _In_ const RECTL* prcl1,
110 _In_ const RECTL* prcl2);
111
112VOID
116
117VOID
121 _In_ INT dx,
122 _In_ INT dy);
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
#define min(a, b)
Definition: monoChain.cc:55
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define FASTCALL
Definition: nt_native.h:50
long LONG
Definition: pedump.c:60
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
& rect
Definition: startmenu.cpp:1413
#define max(a, b)
Definition: svc.c:63
int32_t INT
Definition: typedefs.h:58
#define FORCEINLINE
Definition: wdftypes.h:67
FORCEINLINE LONG RECTL_lGetWidth(_In_ const RECTL *prcl)
Definition: rect.h:93
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_bClipRectBySize(_Out_ RECTL *prclDst, _In_ const RECTL *prclSrc, _In_ const SIZEL *pszl)
Definition: rect.h:72
FORCEINLINE BOOL RECTL_bIsWellOrdered(_In_ const RECTL *prcl)
Definition: rect.h:63
FORCEINLINE BOOL RECTL_bPointInRect(_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
Definition: rect.h:52
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
VOID FASTCALL RECTL_vInflateRect(_Inout_ RECTL *rect, _In_ INT dx, _In_ INT dy)
Definition: rect.c:101
FORCEINLINE VOID RECTL_vOffsetRect(_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
Definition: rect.h:31
FORCEINLINE LONG RECTL_lGetHeight(_In_ const RECTL *prcl)
Definition: rect.h:86
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
Definition: rect.c:81
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
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDst
Definition: winddi.h:4193
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
Definition: winddi.h:3418
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3531