// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp.Drawing.Paths { using System.Numerics; /// /// A aggregate of s making a single logical path /// /// public class Path : IPath { /// /// The inner path. /// private readonly InternalPath innerPath; /// /// Initializes a new instance of the class. /// /// The segment. public Path(params ILineSegment[] segment) { this.innerPath = new InternalPath(segment, false); } /// public RectangleF Bounds => this.innerPath.Bounds; /// public bool IsClosed => false; /// public float Length => this.innerPath.Length; /// public Vector2[] AsSimpleLinearPath() { return this.innerPath.Points; } /// public PointInfo Distance(Vector2 point) { return this.innerPath.DistanceFromPath(point); } } }