Author: jimtabor
Date: Wed Apr 16 22:46:46 2008
New Revision: 32995
URL:
http://svn.reactos.org/svn/reactos?rev=32995&view=rev
Log:
Removed w.ArcDirection. Now we are using dclevel path flags.
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/objects/coord.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/path.c
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] Wed Apr 16 22:46:46 2008
@@ -346,7 +346,6 @@
INT DCOrgX; /* DC origin */
INT DCOrgY;
- INT ArcDirection;
XFORM xformWorld2Wnd; /* World-to-window transformation */
XFORM xformWorld2Vport; /* World-to-viewport transformation */
Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Wed Apr 16 22:46:46
2008
@@ -980,10 +980,10 @@
if (!(Dc_Attr->flTextAlign & TA_CENTER)) Dc_Attr->flTextAlign |= TA_RIGHT;
- if (dc->w.ArcDirection == AD_CLOCKWISE)
- dc->w.ArcDirection = AD_COUNTERCLOCKWISE;
+ if (dc->DcLevel.flPath & DCPATH_CLOCKWISE)
+ dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
else
- dc->w.ArcDirection = AD_CLOCKWISE;
+ dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
Dc_Attr->flXform |=
(PAGE_EXTENTS_CHANGED|INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID);
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Wed Apr 16 22:46:46
2008
@@ -146,6 +146,7 @@
nDc_Attr->jROP2 = oDc_Attr->jROP2;
nDc_Attr->dwLayout = oDc_Attr->dwLayout;
if (oDc_Attr->dwLayout & LAYOUT_ORIENTATIONMASK) Layout =
oDc_Attr->dwLayout;
+ NewDC->DcLevel.flPath = OrigDC->DcLevel.flPath;
DC_UnlockDc(NewDC);
DC_UnlockDc(OrigDC);
@@ -828,6 +829,7 @@
NewDC->erclWindow.top = NewDC->erclWindow.left = 0;
NewDC->erclWindow.right = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes;
NewDC->erclWindow.bottom = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes;
+ NewDC->DcLevel.flPath = DCPATH_CLOCKWISE;
DC_UnlockDc( NewDC );
@@ -1248,7 +1250,7 @@
#endif
nDc_Attr->ptlCurrent = Dc_Attr->ptlCurrent;
nDc_Attr->ptfxCurrent = Dc_Attr->ptfxCurrent;
- newdc->w.ArcDirection = dc->w.ArcDirection;
+ newdc->DcLevel.flPath = dc->DcLevel.flPath;
newdc->w.xformWorld2Wnd = dc->w.xformWorld2Wnd;
newdc->w.xformWorld2Vport = dc->w.xformWorld2Vport;
newdc->w.xformVport2World = dc->w.xformVport2World;
@@ -1318,7 +1320,7 @@
#endif
Dc_Attr->ptlCurrent = sDc_Attr->ptlCurrent;
Dc_Attr->ptfxCurrent = sDc_Attr->ptfxCurrent;
- dc->w.ArcDirection = dcs->w.ArcDirection;
+ dc->DcLevel.flPath = dcs->DcLevel.flPath;
dc->w.xformWorld2Wnd = dcs->w.xformWorld2Wnd;
dc->w.xformWorld2Vport = dcs->w.xformWorld2Vport;
dc->w.xformVport2World = dcs->w.xformVport2World;
@@ -2105,7 +2107,10 @@
SafeResult = Dc_Attr->cBreak;
break;
case GdiGetArcDirection:
- SafeResult = dc->w.ArcDirection;
+ if (Dc_Attr->dwLayout & LAYOUT_RTL)
+ SafeResult = AD_CLOCKWISE - ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) !=
0);
+ else
+ SafeResult = ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0) +
AD_COUNTERCLOCKWISE;
break;
case GdiGetEMFRestorDc:
break;
@@ -2217,29 +2222,26 @@
Ret = FALSE;
break;
}
- if ( Dc_Attr->dwLayout & LAYOUT_RTL )
+ if ( Dc_Attr->dwLayout & LAYOUT_RTL ) // Right to Left
{
SafeResult = AD_CLOCKWISE - ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) !=
0);
if ( dwIn == AD_CLOCKWISE )
{
- dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+ dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
break;
}
- dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
- }
- else
+ dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+ }
+ else // Left to Right
{
SafeResult = ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0) +
AD_COUNTERCLOCKWISE;
if ( dwIn == AD_COUNTERCLOCKWISE)
{
- dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+ dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
break;
}
- dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
- }
-
- SafeResult = dc->w.ArcDirection; // Fixme
- dc->w.ArcDirection = dwIn; // Fixme
+ dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+ }
break;
default:
SetLastWin32Error(ERROR_INVALID_PARAMETER);
Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Wed Apr 16 22:46:46
2008
@@ -757,7 +757,7 @@
ASSERT ( dc );
- clockwise = ( dc->w.ArcDirection == AD_CLOCKWISE );
+ clockwise = ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0);
/* Check that path is open */
if ( dc->w.path.state != PATH_Open )