Author: jimtabor Date: Mon Jun 9 11:46:52 2008 New Revision: 33907
URL: http://svn.reactos.org/svn/reactos?rev=33907&view=rev Log: - Fix Ellipes, for Filip Navara, nice work! - Ref: http://www.reactos.org/archives/public/ros-dev/2007-January/009090.html - Test: http://www.reactos.org/pipermail/ros-dev/attachments/20070118/46ace072/attac...
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Mon Jun 9 11:46:52 2008 @@ -166,6 +166,8 @@ return TRUE; }
+ + /******************************************************************************/
/* @@ -205,12 +207,22 @@ PDC dc; PDC_ATTR Dc_Attr; BOOL ret = TRUE, Cond1, Cond2; - +/* top + ___________________ + +| | + | | + | | + left | | right + | | + | | + 0|___________________| + 0 bottom + + */ /* * Check the parameters. */ - - if (nRightRect <= nLeftRect || nBottomRect <= nTopRect) + DPRINT("nLeftRect: %d, nTopRect: %d, nRightRect: %d, nBottomRect: %d\n",nLeftRect,nTopRect,nRightRect,nBottomRect); + if (nRightRect <= nLeftRect || nTopRect <= nBottomRect) { SetLastWin32Error(ERROR_INVALID_PARAMETER); return FALSE; @@ -272,28 +284,25 @@ RectBounds.bottom = nBottomRect;
IntLPtoDP(dc, (LPPOINT)&RectBounds, 2); + DPRINT("1: Left: %d, Top: %d, Right: %d, Bottom: %d\n", + RectBounds.left,RectBounds.top,RectBounds.right,RectBounds.bottom);
RectBounds.left += dc->ptlDCOrig.x; RectBounds.right += dc->ptlDCOrig.x; RectBounds.top += dc->ptlDCOrig.y; RectBounds.bottom += dc->ptlDCOrig.y; - - RadiusX = max((RectBounds.right - RectBounds.left) >> 1, 1); - RadiusY = max((RectBounds.bottom - RectBounds.top) >> 1, 1); + DPRINT("2: Left: %d, Top: %d, Right: %d, Bottom: %d\n", + RectBounds.left,RectBounds.top,RectBounds.right,RectBounds.bottom); + + RadiusX = (RectBounds.right - RectBounds.left)/2; + RadiusY = (RectBounds.bottom - RectBounds.top)/2; CenterX = RectBounds.left + RadiusX; CenterY = RectBounds.top + RadiusY; - - if (RadiusX > RadiusY) - { - nx = RadiusX; - ny = RadiusY; - } - else - { - nx = RadiusY; - ny = RadiusX; - } - + DPRINT("3: RadiusX: %d, RadiusY: %d, CenterX: %d, CenterY: %d\n", + RadiusX,RadiusY,CenterX,CenterY); + + nx = RadiusX; + ny = -RadiusY; da = -1; db = 0xFFFF; ix = 0; @@ -389,7 +398,7 @@ BRUSHOBJ_UnlockBrush(FillBrush); PENOBJ_UnlockPen(PenBrush); DC_UnlockDc(dc); - + DPRINT("NtGdiEllipse exit \n"); return ret; }