From ff6bda89605c1ee4b5e857b7ff591df47f0e541c Mon Sep 17 00:00:00 2001
From: Huw D M Davies <hdavies@codeweavers.com>
Date: Tue, 13 Aug 2002 18:12:52 +0000
Subject: [PATCH] At the end of PATH_StrokePath, update dc->CurPosX|Y so that
 their values are in logical co-ords.

---
 graphics/path.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/graphics/path.c b/graphics/path.c
index 139a7d1ea20..2a2769033d9 100644
--- a/graphics/path.c
+++ b/graphics/path.c
@@ -1578,6 +1578,19 @@ static BOOL PATH_StrokePath(DC *dc, GdiPath *pPath)
     SetGraphicsMode(dc->hSelf, GM_ADVANCED);
     SetWorldTransform(dc->hSelf, &xform);
     SetGraphicsMode(dc->hSelf, graphicsMode);
+
+    /* If we've moved the current point then get its new position
+       which will be in device (MM_TEXT) co-ords, convert it to
+       logical co-ords and re-set it.  This basically updates
+       dc->CurPosX|Y so that their values are in the correct mapping
+       mode.
+    */
+    if(i > 0) {
+        POINT pt;
+        GetCurrentPositionEx(dc->hSelf, &pt);
+        DPtoLP(dc->hSelf, &pt, 1);
+        MoveToEx(dc->hSelf, pt.x, pt.y, NULL);
+    }
     return ret;
 }
 
-- 
GitLab