ImageSharp.Drawing
ImageSharp.Drawing copied to clipboard
Shapes: Add polygon triangulation
Hey, i was just exploring this project a bit and was wondering if it would be interesting for you to have a Polygon Triangulator. This task is quite frequently needed in computer graphics related projects. So the proposal would be to add a function to the polygon class, which returns a list of triangles.
As a foundation for such an algorithm this could be used: https://github.com/mapbox/earcut
Sounds interesting. @tocsoft What do you think?
I don't see a problem with adding it.... I would be inclined to think that it should be a set of extensions/helper class in the same style as https://github.com/SixLabors/Shapes/blob/master/src/SixLabors.Shapes/Outliner.cs as hopefully we should be able to use any phat to generate the collection of triangles.
I would consider this out of scope now, I believe we should focus on drawing & fonts feature gaps + performance issues.
@tocsoft moving to Future for now, if you agree that this is no longer realistic, let's close.