]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 20 May 2018 23:32:04 +0000 (19:32 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 20 May 2018 23:32:04 +0000 (19:32 -0400)
MagickCore/draw.c
coders/svg.c

index a44d4ff38c922b75138a5bf5b0f0ae88df62a8ac..cb14743bc71ed46e1132fadc028e5ad9cfebf29e 100644 (file)
@@ -2583,6 +2583,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
       case 'c':
       case 'C':
       {
+        if (LocaleCompare("class",keyword) == 0)
+          {
+            /*
+              Class primitive.
+            */
+            break;
+          }
         if (LocaleCompare("clip-path",keyword) == 0)
           {
             char
@@ -3036,6 +3043,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("pop",keyword) == 0)
           {
             GetNextToken(q,&q,extent,token);
+            if (LocaleCompare("class",token) == 0)
+              break;
             if (LocaleCompare("clip-path",token) == 0)
               break;
             if (LocaleCompare("defs",token) == 0)
@@ -3084,6 +3093,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("push",keyword) == 0)
           {
             GetNextToken(q,&q,extent,token);
+            if (LocaleCompare("class",token) == 0)
+              {
+                /*
+                  Class context.
+                */
+                break;
+              }
             if (LocaleCompare("clip-path",token) == 0)
               {
                 char
@@ -3403,8 +3419,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("stroke-antialias",keyword) == 0)
           {
             GetNextToken(q,&q,extent,token);
-            graphic_context[n]->stroke_antialias=
-              StringToLong(token) != 0 ? MagickTrue : MagickFalse;
+            graphic_context[n]->stroke_antialias=StringToLong(token) != 0 ?
+              MagickTrue : MagickFalse;
             break;
           }
         if (LocaleCompare("stroke-dasharray",keyword) == 0)
index 8ef0cdb9b0a2b7972690f66f319db94da2137491..538823793105c1948c01f127ba38a0de50bee438 100644 (file)
@@ -1139,11 +1139,8 @@ static void SVGStartElement(void *context,const xmlChar *name,
     case 'S':
     case 's':
     {
-      if (LocaleCompare((const char *) name,"symbol") == 0)
-        {
-          (void) FormatLocaleFile(svg_info->file,"push symbol\n");
-          break;
-        }
+      if (LocaleCompare((char *) name,"style") == 0)
+        break;
       if (LocaleCompare((const char *) name,"svg") == 0)
         {
           svg_info->svgDepth++;
@@ -1157,6 +1154,11 @@ static void SVGStartElement(void *context,const xmlChar *name,
           (void) FormatLocaleFile(svg_info->file,"fill-rule nonzero\n");
           break;
         }
+      if (LocaleCompare((const char *) name,"symbol") == 0)
+        {
+          (void) FormatLocaleFile(svg_info->file,"push symbol\n");
+          break;
+        }
       break;
     }
     case 'T':
@@ -2552,9 +2554,11 @@ static void SVGEndElement(void *context,const xmlChar *name)
             svg_info->stop_color,svg_info->offset);
           break;
         }
-      if (LocaleCompare((const char *) name,"symbol") == 0)
+      if (LocaleCompare((char *) name,"style") == 0)
         {
-          (void) FormatLocaleFile(svg_info->file,"pop symbol\n");
+          /*
+            Find style definitions in svg_info->text.
+          */
           break;
         }
       if (LocaleCompare((const char *) name,"svg") == 0)
@@ -2563,6 +2567,11 @@ static void SVGEndElement(void *context,const xmlChar *name)
           svg_info->svgDepth--;
           break;
         }
+      if (LocaleCompare((const char *) name,"symbol") == 0)
+        {
+          (void) FormatLocaleFile(svg_info->file,"pop symbol\n");
+          break;
+        }
       break;
     }
     case 'T':