ReactOS 0.4.15-dev-7942-gd23573b
rect.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FORCEINLINE VOID RECTL_vSetRect (_Out_ RECTL *prcl, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
 
FORCEINLINE VOID RECTL_vSetEmptyRect (_Out_ RECTL *prcl)
 
FORCEINLINE VOID RECTL_vOffsetRect (_Inout_ RECTL *prcl, _In_ INT cx, _In_ INT cy)
 
FORCEINLINE BOOL RECTL_bIsEmptyRect (_In_ const RECTL *prcl)
 
FORCEINLINE BOOL RECTL_bPointInRect (_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
 
FORCEINLINE BOOL RECTL_bIsWellOrdered (_In_ const RECTL *prcl)
 
FORCEINLINE BOOL RECTL_bClipRectBySize (_Out_ RECTL *prclDst, _In_ const RECTL *prclSrc, _In_ const SIZEL *pszl)
 
FORCEINLINE LONG RECTL_lGetHeight (_In_ const RECTL *prcl)
 
FORCEINLINE LONG RECTL_lGetWidth (_In_ const RECTL *prcl)
 
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)
 

Function Documentation

◆ RECTL_bClipRectBySize()

FORCEINLINE BOOL RECTL_bClipRectBySize ( _Out_ RECTL prclDst,
_In_ const RECTL prclSrc,
_In_ const SIZEL pszl 
)

Definition at line 72 of file rect.h.

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}
#define min(a, b)
Definition: monoChain.cc:55
#define max(a, b)
Definition: svc.c:63
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:4193
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
Definition: winddi.h:3418

Referenced by IntEngBitBlt().

◆ 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
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20

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

FORCEINLINE BOOL RECTL_bIsEmptyRect ( _In_ const RECTL prcl)

◆ RECTL_bIsWellOrdered()

FORCEINLINE BOOL RECTL_bIsWellOrdered ( _In_ const RECTL prcl)

Definition at line 63 of file rect.h.

65{
66 return ((prcl->left <= prcl->right) &&
67 (prcl->top <= prcl->bottom));
68}

Referenced by DbgDrvBitBlt().

◆ RECTL_bPointInRect()

FORCEINLINE BOOL RECTL_bPointInRect ( _In_ const RECTL prcl,
_In_ INT  x,
_In_ INT  y 
)

Definition at line 52 of file rect.h.

56{
57 return (x >= prcl->left && x < prcl->right &&
58 y >= prcl->top && y < prcl->bottom);
59}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble right
Definition: glext.h:10859
GLint GLint bottom
Definition: glext.h:7726

Referenced by addItemFlood(), co_WinPosSearchChildren(), GetNCHitEx(), IntPtInWindow(), IntTrackMouseMove(), MENU_FindItemByCoords(), NtUserDragDetect(), NtUserMenuItemFromPoint(), and SystemTimerProc().

◆ 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}

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

◆ RECTL_lGetHeight()

FORCEINLINE LONG RECTL_lGetHeight ( _In_ const RECTL prcl)

Definition at line 86 of file rect.h.

87{
88 return prcl->bottom - prcl->top;
89}

Referenced by DIB_1BPP_BitBltSrcCopy_From1BPP(), PATH_Ellipse(), and PATH_RoundRect().

◆ RECTL_lGetWidth()

FORCEINLINE LONG RECTL_lGetWidth ( _In_ const RECTL prcl)

Definition at line 93 of file rect.h.

94{
95 return prcl->right - prcl->left;
96}

Referenced by DIB_1BPP_BitBltSrcCopy_From1BPP(), PATH_Ellipse(), and PATH_RoundRect().

◆ RECTL_vInflateRect()

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

◆ RECTL_vMakeWellOrdered()

◆ RECTL_vOffsetRect()

◆ RECTL_vSetEmptyRect()

FORCEINLINE VOID RECTL_vSetEmptyRect ( _Out_ RECTL prcl)

Definition at line 20 of file rect.h.

22{
23 prcl->left = 0;
24 prcl->top = 0;
25 prcl->right = 0;
26 prcl->bottom = 0;
27}

Referenced by CLIPPING_UpdateGCRegion(), co_WinPosDoNCCALCSize(), DefWndDoSizeMove(), get_valid_rects(), IntDefWindowProc(), NtUserGetMenuBarInfo(), RECTL_bIntersectRect(), RECTL_bUnionRect(), and REGION_bXformRgn().

◆ RECTL_vSetRect()

FORCEINLINE VOID RECTL_vSetRect ( _Out_ RECTL prcl,
_In_ LONG  left,
_In_ LONG  top,
_In_ LONG  right,
_In_ LONG  bottom 
)

Definition at line 5 of file rect.h.

11{
12 prcl->left = left;
13 prcl->top = top;
14 prcl->right = right;
15 prcl->bottom = bottom;
16}
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLint left
Definition: glext.h:7726

Referenced by co_WinPosMinMaximize(), DefWndDoSizeMove(), GreGetDIBitsInternal(), IntIsWindowFullscreen(), IntTrackMouseEvent(), IntTrackMouseMove(), make_point_onscreen(), MENU_CalcItemSize(), NtGdiExtFloodFill(), NtGdiSetPixel(), PATH_CheckRect(), PATH_RoundRect(), and UserDrawIconEx().