private SVGPathSegClosePath CreateSVGPathSegClosePath() { SVGPathSeg lastSegment = _segList.GetLastItem(); SVGPathSeg firstSegment = _segList.GetItem(0); /* * SVGPathSegMovetoAbs _firstPoint = _segList.GetItem(0) as SVGPathSegMovetoAbs; * if (_firstPoint == null) * { * SVGPathSegMovetoRel _firstPoint1 = _segList.GetItem(0) as SVGPathSegMovetoRel; * if (_firstPoint1 != null) * return new SVGPathSegClosePath(_firstPoint1.currentPoint, lastSegment); * } else * { * return new SVGPathSegClosePath(_firstPoint.currentPoint, lastSegment); * } */ if (firstSegment != null) { return(new SVGPathSegClosePath(firstSegment.currentPoint, lastSegment)); } else { return(null); } }
private SVGPathSegClosePath CreateSVGPathSegClosePath() { SVGPathSeg lastSegment = _segList.GetLastItem(); SVGPathSeg firstSegment = _segList.GetItem(0); if (firstSegment != null) { return(new SVGPathSegClosePath(firstSegment.currentPoint, lastSegment)); } else { return(null); } }