Commit addc38a7 authored by sovietmagic's avatar sovietmagic
Browse files

SvgPointCollection.ToString method modified to return valid coordinate string...

SvgPointCollection.ToString method modified to return valid coordinate string with each coordinate pair separated by whitespace and their x and y values separated by comma.
parent 2bf55043
...@@ -15,13 +15,22 @@ namespace Svg ...@@ -15,13 +15,22 @@ namespace Svg
{ {
public override string ToString() public override string ToString()
{ {
string ret = ""; var builder = new StringBuilder();
foreach (var unit in this) for (var i = 0; i < Count; i += 2)
{ {
ret += unit.ToString() + " "; if (i + 1 < Count)
{
if (i > 1)
{
builder.Append(" ");
}
// we don't need unit type
builder.Append(this[i].Value.ToString(CultureInfo.InvariantCulture));
builder.Append(",");
builder.Append(this[i + 1].Value.ToString(CultureInfo.InvariantCulture));
}
} }
return builder.ToString();
return ret;
} }
} }
......
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