merge the IPath and IShape interfaces into a single structure
tocsoft opened this issue · 0 comments
tocsoft commented
IPath should have
Rectangle Bounds { get; }
bounds enclosing the pathPointInfo Distance(Vector2 point)
distance from and along the pathIPath Transform(Matrix3x2 matrix)
applies the matrix transform to the path.int MaxIntersections { get; }
Gets the maximum number intersections that a shape can have when testing a line.IsClosed
details weather the path is closed or openbool Contains(Vector2 point);
returns true if the point is contained within the closed version of this pathint FindIntersections(Vector2 start, Vector2 end, Vector2[] buffer, int count, int offset);
populates the buffer with all the point that intersect the lineIPath AsClosedPath()
if this is an open path closes it and returns that, otherwise it returns itselfImmutableArray<SimplePath> Flatten()
a collection of simple paths making up this potentially complex one
Add new SimplePath
struct
ImmutableArray<Vector2> Points { get; }
bool IsClosed { get; }
drop IShape
as IPath
will cover the requirements