SharpVectors.Dom.Svg.SvgPathSegList.InsertItemBefore C# (CSharp) Method

InsertItemBefore() public method

public InsertItemBefore ( ISvgPathSeg newItem, int index ) : ISvgPathSeg
newItem ISvgPathSeg
index int
return ISvgPathSeg
        public ISvgPathSeg InsertItemBefore( ISvgPathSeg newItem, int index )
        {
            if(readOnly)
            {
                throw new DomException(DomExceptionType.NoModificationAllowedErr);
            }
            else
            {
                segments.Insert(index, newItem);
                setListAndIndex(newItem as SvgPathSeg, index);
                changeIndexes(index+1, 1);

                return newItem;
            }
        }