[magick-developers] svg, text element, style attribute: spaces,
default for fill
Thomas.Stegemann at materna.de
Thomas.Stegemann at materna.de
Wed Jul 25 11:52:15 PDT 2007
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
More information about the Magick-developers
mailing list