[5/5] gdiplus: Don't add control points to the result in GdipFlattenPath.

Vincent Povirk madewokherd at gmail.com
Tue Mar 13 14:44:37 CDT 2012


-------------- next part --------------
From 637d2b876aa57649b4ec82663bcc07b13a6bb80e Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Wed, 29 Feb 2012 13:35:28 -0600
Subject: [PATCH 5/8] gdiplus: Don't add control points to the result in
 GdipFlattenPath.

This if statement was probably meant to ensure that we add the start point
of a segment of a bezier curve, but since we've already advanced past that
point in all cases, we've already added that point. What the statement
actually does is add the first control point, which shouldn't be in the curve
at all and messes up later calculations.
---
 dlls/gdiplus/graphicspath.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 120802c..131477e 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -1207,14 +1207,7 @@ GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatnes
             continue;
         }
 
-        /* Bezier curve always stored as 4 points */
-        if((path->pathdata.Types[i-1] & PathPointTypePathTypeMask) != PathPointTypeStart){
-            type = (path->pathdata.Types[i] & ~PathPointTypePathTypeMask) | PathPointTypeLine;
-            if(!add_path_list_node(node, pt.X, pt.Y, type))
-                goto memout;
-
-            node = node->next;
-        }
+        /* Bezier curve */
 
         /* test for closed figure */
         if(path->pathdata.Types[i+1] & PathPointTypeCloseSubpath){
-- 
1.7.9


More information about the wine-patches mailing list