public IPath CreatePath(IList <PathPoint> origins) { if (origins == null) { throw new ArgumentNullException(nameof(origins)); } if (origins.Count != 3) { throw new ArgumentOutOfRangeException(nameof(origins)); } var segments = new PathSegmentList() { new LinePathSegment() { Origin = origins[0] }, new LinePathSegment() { Origin = origins[1] }, new LinePathSegment() { Origin = origins[2] } }; var path = new Path(this, segments); return(path); }
protected Path(Path prototype) { if (prototype == null) { throw new ArgumentNullException(nameof(prototype)); } m_pathGeometry = prototype.m_pathGeometry; m_segments = prototype.m_segments.Clone(); }
public Path(JToken json) { if (json == null) { throw new ArgumentNullException(nameof(json)); } m_pathGeometry = PathGeometryFactory.Create(json[JsonNames.PathGeometry]); m_segments = new PathSegmentList(json[JsonNames.Segments]); }
public Path(IPathGeometry pathGeometry, PathSegmentList segments) { m_pathGeometry = pathGeometry ?? throw new ArgumentNullException(nameof(pathGeometry)); m_segments = segments ?? throw new ArgumentNullException(nameof(segments)); }