Commit c7dd7a71 authored by owaits's avatar owaits
Browse files

SvgUnit comparison seems not to be working so added IsNone() method to...

SvgUnit comparison seems not to be working so added IsNone() method to correctly identify a none type.
parent a2026b41
...@@ -36,6 +36,14 @@ namespace Svg ...@@ -36,6 +36,14 @@ namespace Svg
get { return this._isEmpty; } get { return this._isEmpty; }
} }
/// <summary>
/// Gets whether this unit is none.
/// </summary>
public bool IsNone
{
get { return _type == SvgUnitType.None; }
}
/// <summary> /// <summary>
/// Gets the value of the unit. /// Gets the value of the unit.
/// </summary> /// </summary>
......
...@@ -40,7 +40,7 @@ namespace Svg ...@@ -40,7 +40,7 @@ namespace Svg
foreach (string point in points) foreach (string point in points)
{ {
SvgUnit newUnit = (SvgUnit)_unitConverter.ConvertFrom(point.Trim()); SvgUnit newUnit = (SvgUnit)_unitConverter.ConvertFrom(point.Trim());
if(newUnit != SvgUnit.None) if (!newUnit.IsNone)
units.Add(newUnit); units.Add(newUnit);
} }
......
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