Author: jimtabor
Date: Thu Apr 17 00:11:28 2008
New Revision: 32996
URL:
http://svn.reactos.org/svn/reactos?rev=32996&view=rev
Log:
Example way to set DCOrg with new dc object.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dc.c
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 00:11:28
2008
@@ -1111,6 +1111,34 @@
Point->y = dc->w.DCOrgY;
return TRUE;
+}
+
+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;
+
+ return pdc->ptlFillOrigin.y;
+}
+
+VOID
+STDCALL
+GdiSetDCOrg(HDC hDC, LONG Left, LONG Top, PRECTL prc)
+{
+ PDC pdc;
+
+ pdc = DC_LockDc(hDC);
+ if (!pdc) return;
+
+ pdc->ptlSaveFillOrig.x = Left;
+ pdc->ptlSaveFillOrig.y = Top;
+
+ IntCalcFillOrigin(pdc);
+
+ if (prc) pdc->erclWindow = *prc;
+
+ DC_UnlockDc(pdc);
}
BOOL FASTCALL