Unverified Commit 4d4acd6e authored by mrbean-bremen's avatar mrbean-bremen
Browse files

Ignore color in invalid numeric format

- fixes #342
parent f28f5a2c
......@@ -155,7 +155,13 @@ namespace Svg
case "windowframe": return SystemColors.WindowFrame;
case "windowtext": return SystemColors.WindowText;
}
int number;
if (Int32.TryParse(colour, out number))
{
// numbers are handled as colors by System.Drawing.ColorConverter - we
// have to prevent this and ignore the color instead (see #342)
return SvgColourServer.NotSet;
}
}
finally
{
......
......@@ -186,6 +186,7 @@ __issue-323-02
__issue-323-03
__issue-329-01
__issue-338-01_stroke_width
__issue-342-01
__issue-354-01
__issue-385-01_Test_text-anchor-middle
__issue-398-01
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="45">
<g style="opacity:1; fill:000000; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="180" height="180">
<g style="opacity:1; fill:000000; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="scale(4)">
<g style="fill:#000000; stroke:none;">
<circle cx="6" cy="12" r="2.75" />
<circle cx="14" cy="9" r="2.75" />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment