SVGPathSegList.GetItem C# (CSharp) Метод

GetItem() публичный метод

public GetItem ( int index ) : SVGPathSeg,
index int
Результат SVGPathSeg,
    public SVGPathSeg GetItem(int index)
    {
        if(index < 0 || index > _segList.Count)
          return null;
        return (SVGPathSeg)this._segList[index];
    }

Usage Example

Пример #1
0
    /***********************************************************************************/
    //Create Methods
    private SVGPathSegClosePath CreateSVGPathSegClosePath()
    {
        SVGPathSegMovetoAbs _firstPoint = _segList.GetItem(0) as SVGPathSegMovetoAbs;

        if (_firstPoint == null)
        {
            SVGPathSegMovetoRel _firstPoint1 = _segList.GetItem(0) as SVGPathSegMovetoRel;
            if (_firstPoint1 != null)
            {
                return(new SVGPathSegClosePath(_firstPoint1.x, _firstPoint1.y));
            }
        }
        else
        {
            return(new SVGPathSegClosePath(_firstPoint.x, _firstPoint.y));
        }

        return(new SVGPathSegClosePath(-1f, -1f));
    }