|
using System;
namespace SharpVectors.Dom.Svg
{
/// <summary>
/// Summary description for SvgStopElement.
/// </summary>
public sealed class SvgStopElement : SvgStyleableElement, ISvgStopElement
{
public SvgStopElement(string prefix, string localname, string ns, SvgDocument doc)
: base(prefix, localname, ns, doc)
{
}
public ISvgAnimatedNumber Offset
{
get
{
string attr = GetAttribute("offset").Trim();
if (attr.EndsWith("%"))
{
attr = attr.TrimEnd(new char[1]{'%'});
}
else
{
double tmp = SvgNumber.ParseNumber(attr) * 100;
attr = tmp.ToString(SvgNumber.Format);
}
return new SvgAnimatedNumber(attr);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.