Author: jimtabor
Date: Thu Apr 17 21:23:38 2008
New Revision: 33015
URL:
http://svn.reactos.org/svn/reactos?rev=33015&view=rev
Log:
Add new examples for retrieving DC origin.
Modified:
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Thu Apr 17 21:23:38
2008
@@ -97,7 +97,7 @@
HDC hNext;
HDC hPrev;
RECTL erclClip;
- POINTL ptlSaveFillOrig;
+ POINTL ptlDCOrig;
RECTL erclWindow;
RECTL erclBounds;
RECTL erclBoundsApp;
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] Thu Apr 17 21:23:38
2008
@@ -1116,8 +1116,8 @@
LONG FASTCALL
IntCalcFillOrigin(PDC pdc)
{
- pdc->ptlFillOrigin.x = pdc->DcLevel.ptlBrushOrigin.x +
pdc->ptlSaveFillOrig.x;
- pdc->ptlFillOrigin.y = pdc->DcLevel.ptlBrushOrigin.y +
pdc->ptlSaveFillOrig.y;
+ pdc->ptlFillOrigin.x = pdc->DcLevel.ptlBrushOrigin.x + pdc->ptlDCOrig.x;
+ pdc->ptlFillOrigin.y = pdc->DcLevel.ptlBrushOrigin.y + pdc->ptlDCOrig.y;
return pdc->ptlFillOrigin.y;
}
@@ -1131,14 +1131,37 @@
pdc = DC_LockDc(hDC);
if (!pdc) return;
- pdc->ptlSaveFillOrig.x = Left;
- pdc->ptlSaveFillOrig.y = Top;
+ pdc->ptlDCOrig.x = Left;
+ pdc->ptlDCOrig.y = Top;
IntCalcFillOrigin(pdc);
if (prc) pdc->erclWindow = *prc;
DC_UnlockDc(pdc);
+}
+
+
+BOOL FASTCALL
+IntGdiGetDCOrg(PDC pDc, PPOINTL ppt)
+{
+ *ppt = pDc->ptlDCOrig;
+ return TRUE;
+}
+
+BOOL STDCALL
+GdiGetDCOrgEx(HDC hDC, PPOINTL ppt, PRECTL prc)
+{
+ PDC pdc;
+
+ pdc = DC_LockDc(hDC);
+ if (!pdc) return FALSE;
+
+ *prc = pdc->erclWindow;
+ *ppt = pdc->ptlDCOrig;
+
+ DC_UnlockDc(pdc);
+ return TRUE;
}
BOOL FASTCALL