diff --git a/reactos/lib/gdi32/misc/stubs.c b/reactos/lib/gdi32/misc/stubs.c index 0dde5376501..514fd01d4ca 100644 --- a/reactos/lib/gdi32/misc/stubs.c +++ b/reactos/lib/gdi32/misc/stubs.c @@ -1,4 +1,4 @@ -/* $Id: stubs.c,v 1.41 2003/12/12 14:22:36 gvg Exp $ +/* $Id: stubs.c,v 1.42 2003/12/15 20:47:57 navaraf Exp $ * * reactos/lib/gdi32/misc/stubs.c * @@ -544,21 +544,6 @@ PtVisible( } -/* - * @unimplemented - */ -BOOL -STDCALL -RectVisible( - HDC a0, - CONST RECT *a1 - ) -{ - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - - /* * @unimplemented */ diff --git a/reactos/lib/gdi32/objects/dc.c b/reactos/lib/gdi32/objects/dc.c index 7025d407a36..233fe449a46 100644 --- a/reactos/lib/gdi32/objects/dc.c +++ b/reactos/lib/gdi32/objects/dc.c @@ -894,3 +894,16 @@ GetDCOrgEx( { return NtGdiGetDCOrgEx(a0,a1); } + +/* + * @implemented + */ +BOOL +STDCALL +RectVisible( + HDC a0, + CONST RECT *a1 + ) +{ + return NtGdiRectVisible(a0,(RECT *)a1); +} diff --git a/reactos/subsys/win32k/objects/cliprgn.c b/reactos/subsys/win32k/objects/cliprgn.c index 30513aeb782..1750bb21660 100644 --- a/reactos/subsys/win32k/objects/cliprgn.c +++ b/reactos/subsys/win32k/objects/cliprgn.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: cliprgn.c,v 1.27 2003/12/13 12:12:41 weiden Exp $ */ +/* $Id: cliprgn.c,v 1.28 2003/12/15 20:47:57 navaraf Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -224,9 +224,27 @@ BOOL STDCALL NtGdiPtVisible(HDC hDC, } BOOL STDCALL NtGdiRectVisible(HDC hDC, - CONST PRECT rc) + CONST PRECT UnsafeRect) { - UNIMPLEMENTED; + PDC dc = DC_LockDc(hDC); + BOOL Result = FALSE; + RECT Rect; + + if (!dc) + { + return FALSE; + } + + MmCopyFromCaller(&Rect, UnsafeRect, sizeof(RECT)); + + if (dc->w.hGCClipRgn) + { + IntLPtoDP(dc, (LPPOINT)&Rect, 2); + Result = UnsafeIntRectInRegion(dc->w.hGCClipRgn, &Rect); + } + DC_UnlockDc(hDC); + + return Result; } BOOL STDCALL NtGdiSelectClipPath(HDC hDC,