Dmitry Timoshkov : gdiplus: Use same rounding formula that is used to decide whether a path should be stored as an array integers .

Alexandre Julliard julliard at winehq.org
Fri Nov 8 10:36:49 CST 2013


Module: wine
Branch: master
Commit: f204aab17f9310a1bb04ea099b95098f67b6458e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f204aab17f9310a1bb04ea099b95098f67b6458e

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Nov  8 16:33:26 2013 +0900

gdiplus: Use same rounding formula that is used to decide whether a path should be stored as an array integers.

---

 dlls/gdiplus/region.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
index 7186518..3e718ef 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -739,11 +739,9 @@ static inline void write_float(DWORD* location, INT* offset, const FLOAT write)
 static inline void write_packed_point(DWORD* location, INT* offset,
         const GpPointF* write)
 {
-    packed_point point;
-
-    point.X = write->X;
-    point.Y = write->Y;
-    memcpy(location + *offset, &point, sizeof(packed_point));
+    packed_point *point = (packed_point *)(location + *offset);
+    point->X = gdip_round(write->X);
+    point->Y = gdip_round(write->Y);
     (*offset)++;
 }
 




More information about the wine-cvs mailing list