svg, text element, style attribute: spaces, default for fill

<[email protected]>
Newsgroups gmane.comp.video.image-magick.devel
Message-ID <[email protected]>
1. spaces in style attributes

In ImageMagick-6.3.5 in svg.c the spaces of style attributes are not stripped:
I think in "static char **GetStyleTokens(void *context,const char *style,int *number_tokens)"
the trailing spaces have to be removed from the tokens.
According to <http://www.w3.org/TR/SVG/styling.html#StyleAttributeExample> a style attribute may look like style="fill:red; stroke:blue; stroke-width:3".
In ImageMagick-6.3.4 and older versions the spaces are removed with "StripString(tokens[i++]);"


2. default for fill in style attribute

In ImageMagick-6.3.5 in svg.c the default value for "fill" in the style attribute is "none":
static void SVGStartElement(void *context,const xmlChar *name,
  const xmlChar **attributes)
{
...
          if (LocaleCompare(keyword,"style") == 0)
            {
              (void) LogMagickEvent(CoderEvent,GetMagickModule(),"  ");
              MVGPrintf(svg_info->file,"fill none\n");


I think the initial value of "fill" has to be "black" according to <http://www.w3.org/TR/SVG/painting.html#FillProperty>.


Cheers,
Thomas Stegemann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.