]> granicus.if.org Git - imagemagick/commitdiff
Fixed creation of clipmask.
authordirk <dirk@git.imagemagick.org>
Thu, 18 Sep 2014 22:01:17 +0000 (22:01 +0000)
committerdirk <dirk@git.imagemagick.org>
Thu, 18 Sep 2014 22:01:17 +0000 (22:01 +0000)
MagickCore/property.c

index b4e653f5afeeb87b7b664640f802db95c8c9b927..1f3a8a9c2a693fdb9666ff8b11509a64e9d16a46 100644 (file)
@@ -2032,19 +2032,9 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
               (void) FormatLocaleString(message,MaxTextExtent,
                 "L %g %g\n",point[1].x,point[1].y);
             else
-              if ((last[1].x == last[2].x) && (last[1].y == last[2].y))
-                (void) FormatLocaleString(message,MaxTextExtent,
-                  "Q %g %g %g %g\n",point[0].x,point[0].y,
-                  point[1].x,point[1].y);
-              else
-                if ((point[0].x == point[1].x) && (point[0].y == point[1].y))
-                  (void) FormatLocaleString(message,MaxTextExtent,
-                    "S %g %g %g %g\n",last[2].x,last[2].y,
-                    point[1].x,point[1].y);
-                else
-                  (void) FormatLocaleString(message,MaxTextExtent,
-                    "C %g %g %g %g %g %g\n",last[2].x,
-                    last[2].y,point[0].x,point[0].y,point[1].x,point[1].y);
+              (void) FormatLocaleString(message,MaxTextExtent,
+                "C %g %g %g %g %g %g\n",last[2].x,
+                last[2].y,point[0].x,point[0].y,point[1].x,point[1].y);
             for (i=0; i < 3; i++)
               last[i]=point[i];
           }
@@ -2065,19 +2055,9 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
               (void) FormatLocaleString(message,MaxTextExtent,
                 "L %g %g Z\n",first[1].x,first[1].y);
             else
-              if ((last[1].x == last[2].x) && (last[1].y == last[2].y))
-                (void) FormatLocaleString(message,MaxTextExtent,
-                  "Q %g %g %g %g Z\n",first[0].x,first[0].y,
-                  first[1].x,first[1].y);
-              else
-                if ((first[0].x == first[1].x) && (first[0].y == first[1].y))
-                  (void) FormatLocaleString(message,MaxTextExtent,
-                    "S %g %g %g %g Z\n",last[2].x,last[2].y,
-                    first[1].x,first[1].y);
-                else
-                  (void) FormatLocaleString(message,MaxTextExtent,
-                    "C %g %g %g %g %g %g Z\n",last[2].x,
-                    last[2].y,first[0].x,first[0].y,first[1].x,first[1].y);
+              (void) FormatLocaleString(message,MaxTextExtent,
+                "C %g %g %g %g %g %g Z\n",last[2].x,
+                last[2].y,first[0].x,first[0].y,first[1].x,first[1].y);
             (void) ConcatenateString(&path,message);
             in_subpath=MagickFalse;
           }