number_vertices+2UL,sizeof(*polygon_primitive));
if (polygon_primitive == (PrimitiveInfo *) NULL)
return((PrimitiveInfo *) NULL);
- (void) memcpy(polygon_primitive,primitive_info,(size_t)
- number_vertices*sizeof(*polygon_primitive));
+ (void) memcpy(polygon_primitive,primitive_info,(size_t) number_vertices*
+ sizeof(*polygon_primitive));
closed_path=primitive_info[0].closed_subpath;
if (((draw_info->linejoin == RoundJoin) ||
(draw_info->linejoin == MiterJoin)) && (closed_path != MagickFalse))
xmlDocPtr
document;
#endif
+
+ ssize_t
+ svgDepth;
} SVGInfo;
\f
/*
}
if (LocaleCompare((const char *) name,"svg") == 0)
{
+ svg_info->svgDepth++;
PushGraphicContext(id);
(void) FormatLocaleFile(svg_info->file,"compliance \"SVG\"\n");
(void) FormatLocaleFile(svg_info->file,"fill \"black\"\n");
0.0;
(void) FormatLocaleFile(svg_info->file,"affine %g 0 0 %g %g %g\n",
sx,sy,tx,ty);
- if (*background != '\0')
+ if ((svg_info->svgDepth == 1) && (*background != '\0'))
{
PushGraphicContext(id);
(void) FormatLocaleFile(svg_info->file,"fill %s\n",background);
if (LocaleCompare((const char *) name,"svg") == 0)
{
(void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
+ svg_info->svgDepth--;
break;
}
break;
svg_info->image_info=image_info;
svg_info->bounds.width=image->columns;
svg_info->bounds.height=image->rows;
+ svg_info->svgDepth=0;
if (image_info->size != (char *) NULL)
(void) CloneString(&svg_info->size,image_info->size);
if (image->debug != MagickFalse)