Svg.SvgUnit.ToPercentage C# (CSharp) Méthode

ToPercentage() public méthode

Converts the current unit to a percentage, if applicable.
public ToPercentage ( ) : SvgUnit
Résultat SvgUnit
        public SvgUnit ToPercentage()
        {
            switch (this.Type)
            {
                case SvgUnitType.Percentage:
                    return this;
                case SvgUnitType.User:
                    return new SvgUnit(SvgUnitType.Percentage, this.Value * 100);
                default:
                    throw new NotImplementedException();
            }
        }