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

ReplaceItem() public method

public ReplaceItem ( ISvgPathSeg newItem, int index ) : ISvgPathSeg
newItem ISvgPathSeg
index int
return ISvgPathSeg
        public ISvgPathSeg ReplaceItem(ISvgPathSeg newItem, int index )
        {
            if(readOnly)
            {
                throw new DomException(DomExceptionType.NoModificationAllowedErr);
            }
            else
            {
                ISvgPathSeg replacedItem = GetItem(index);
                segments[index] = newItem;
                setListAndIndex(newItem as SvgPathSeg, index);

                return replacedItem;
            }
        }