Add and fix path calls. This allows more drawing tests (Area.exe by Yian)to pass based on observation.

svn path=/trunk/; revision=34198
This commit is contained in:
James Tabor 2008-06-30 00:47:58 +00:00
parent 3150ee723e
commit eb8611b79f
2 changed files with 24 additions and 16 deletions

View file

@ -76,10 +76,7 @@ IntGdiPolygon(PDC dc,
UnsafePoints[CurrentPoint].x += dc->ptlDCOrig.x; UnsafePoints[CurrentPoint].x += dc->ptlDCOrig.x;
UnsafePoints[CurrentPoint].y += dc->ptlDCOrig.y; UnsafePoints[CurrentPoint].y += dc->ptlDCOrig.y;
} }
// No need to have path here.
if (PATH_IsPathOpen(dc->DcLevel))
ret = PATH_Polygon(dc, UnsafePoints, Count );
else
{ {
DestRect.left = UnsafePoints[0].x; DestRect.left = UnsafePoints[0].x;
DestRect.right = UnsafePoints[0].x; DestRect.right = UnsafePoints[0].x;
@ -157,6 +154,8 @@ IntGdiPolyPolygon(DC *dc,
LPINT PolyCounts, LPINT PolyCounts,
int Count) int Count)
{ {
if (PATH_IsPathOpen(dc->DcLevel))
return PATH_PolyPolygon ( dc, Points, PolyCounts, Count);
while (--Count >=0) while (--Count >=0)
{ {
if (!IntGdiPolygon ( dc, Points, *PolyCounts )) if (!IntGdiPolygon ( dc, Points, *PolyCounts ))
@ -225,15 +224,6 @@ NtGdiEllipse(
if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect)) return TRUE; if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect)) return TRUE;
if (nRightRect < nLeftRect)
{
INT tmp = nRightRect; nRightRect = nLeftRect; nLeftRect = tmp;
}
if (nBottomRect < nTopRect)
{
INT tmp = nBottomRect; nBottomRect = nTopRect; nTopRect = tmp;
}
/* /*
* Get pointers to all necessary GDI objects. * Get pointers to all necessary GDI objects.
*/ */
@ -244,6 +234,7 @@ NtGdiEllipse(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->DC_Type == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
@ -251,6 +242,22 @@ NtGdiEllipse(
return TRUE; return TRUE;
} }
if (PATH_IsPathOpen(dc->DcLevel))
{
ret = PATH_Ellipse(dc, nLeftRect, nTopRect, nRightRect, nBottomRect);
DC_UnlockDc(dc);
return ret;
}
if (nRightRect < nLeftRect)
{
INT tmp = nRightRect; nRightRect = nLeftRect; nLeftRect = tmp;
}
if (nBottomRect < nTopRect)
{
INT tmp = nBottomRect; nBottomRect = nTopRect; nTopRect = tmp;
}
Dc_Attr = dc->pDc_Attr; Dc_Attr = dc->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr; if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;

View file

@ -102,17 +102,15 @@ IntGdiLineTo(DC *dc,
if (PATH_IsPathOpen(dc->DcLevel)) if (PATH_IsPathOpen(dc->DcLevel))
{ {
Ret = PATH_LineTo(dc, XEnd, YEnd); Ret = PATH_LineTo(dc, XEnd, YEnd);
//#if 0
if (Ret) if (Ret)
{ {
// FIXME - PATH_LineTo should maybe do this... // FIXME - PATH_LineTo should maybe do this? No
Dc_Attr->ptlCurrent.x = XEnd; Dc_Attr->ptlCurrent.x = XEnd;
Dc_Attr->ptlCurrent.y = YEnd; Dc_Attr->ptlCurrent.y = YEnd;
Dc_Attr->ptfxCurrent = Dc_Attr->ptlCurrent; Dc_Attr->ptfxCurrent = Dc_Attr->ptlCurrent;
CoordLPtoDP(dc, &Dc_Attr->ptfxCurrent); // Update fx CoordLPtoDP(dc, &Dc_Attr->ptfxCurrent); // Update fx
Dc_Attr->ulDirty_ &= ~(DIRTY_PTLCURRENT|DIRTY_PTFXCURRENT|DIRTY_STYLESTATE); Dc_Attr->ulDirty_ &= ~(DIRTY_PTLCURRENT|DIRTY_PTFXCURRENT|DIRTY_STYLESTATE);
} }
//#endif
return Ret; return Ret;
} }
else else
@ -362,6 +360,9 @@ IntGdiPolyPolyline(DC *dc,
pts = pt; pts = pt;
pc = PolyPoints; pc = PolyPoints;
if (PATH_IsPathOpen(dc->DcLevel))
return PATH_PolyPolyline( dc, pt, PolyPoints, Count );
for (i = 0; i < Count; i++) for (i = 0; i < Count; i++)
{ {
ret = IntGdiPolyline ( dc, pts, *pc ); ret = IntGdiPolyline ( dc, pts, *pc );