From: Cristy Date: Sun, 20 May 2018 23:32:04 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-35~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=865c651b744b8bee9dc1c7e9b410418f50113da4;p=imagemagick ... --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index a44d4ff38..cb14743bc 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -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) diff --git a/coders/svg.c b/coders/svg.c index 8ef0cdb9b..538823793 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -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':