mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:13:01 +00:00
Sorry fixed Ellipse, see bug 3337.
svn path=/trunk/; revision=34188
This commit is contained in:
parent
7689eddcc2
commit
6a4e897e5c
1 changed files with 21 additions and 7 deletions
|
@ -222,10 +222,16 @@ NtGdiEllipse(
|
||||||
* Check the parameters.
|
* Check the parameters.
|
||||||
*/
|
*/
|
||||||
DPRINT("nLeftRect: %d, nTopRect: %d, nRightRect: %d, nBottomRect: %d\n",nLeftRect,nTopRect,nRightRect,nBottomRect);
|
DPRINT("nLeftRect: %d, nTopRect: %d, nRightRect: %d, nBottomRect: %d\n",nLeftRect,nTopRect,nRightRect,nBottomRect);
|
||||||
if (nRightRect <= nLeftRect || nTopRect <= nBottomRect)
|
|
||||||
|
if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect)) return TRUE;
|
||||||
|
|
||||||
|
if (nRightRect < nLeftRect)
|
||||||
{
|
{
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
INT tmp = nRightRect; nRightRect = nLeftRect; nLeftRect = tmp;
|
||||||
return FALSE;
|
}
|
||||||
|
if (nBottomRect < nTopRect)
|
||||||
|
{
|
||||||
|
INT tmp = nBottomRect; nBottomRect = nTopRect; nTopRect = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -294,15 +300,23 @@ NtGdiEllipse(
|
||||||
DPRINT("2: Left: %d, Top: %d, Right: %d, Bottom: %d\n",
|
DPRINT("2: Left: %d, Top: %d, Right: %d, Bottom: %d\n",
|
||||||
RectBounds.left,RectBounds.top,RectBounds.right,RectBounds.bottom);
|
RectBounds.left,RectBounds.top,RectBounds.right,RectBounds.bottom);
|
||||||
|
|
||||||
RadiusX = (RectBounds.right - RectBounds.left)/2;
|
RadiusX = max((RectBounds.right - RectBounds.left) >> 1, 1);
|
||||||
RadiusY = (RectBounds.bottom - RectBounds.top)/2;
|
RadiusY = max((RectBounds.bottom - RectBounds.top) >> 1, 1);
|
||||||
CenterX = RectBounds.left + RadiusX;
|
CenterX = RectBounds.left + RadiusX;
|
||||||
CenterY = RectBounds.top + RadiusY;
|
CenterY = RectBounds.top + RadiusY;
|
||||||
DPRINT("3: RadiusX: %d, RadiusY: %d, CenterX: %d, CenterY: %d\n",
|
DPRINT("3: RadiusX: %d, RadiusY: %d, CenterX: %d, CenterY: %d\n",
|
||||||
RadiusX,RadiusY,CenterX,CenterY);
|
RadiusX,RadiusY,CenterX,CenterY);
|
||||||
|
|
||||||
nx = RadiusX;
|
if (RadiusX > RadiusY)
|
||||||
ny = -RadiusY;
|
{
|
||||||
|
nx = RadiusX;
|
||||||
|
ny = RadiusY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nx = RadiusY;
|
||||||
|
ny = RadiusX;
|
||||||
|
}
|
||||||
da = -1;
|
da = -1;
|
||||||
db = 0xFFFF;
|
db = 0xFFFF;
|
||||||
ix = 0;
|
ix = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue