ImageSharp.Drawing icon indicating copy to clipboard operation
ImageSharp.Drawing copied to clipboard

Shapes: Add polygon triangulation

Open feliwir opened this issue 6 years ago • 3 comments

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

feliwir avatar Dec 07 '18 14:12 feliwir

Sounds interesting. @tocsoft What do you think?

JimBobSquarePants avatar Dec 14 '18 00:12 JimBobSquarePants

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.

tocsoft avatar Dec 14 '18 09:12 tocsoft

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.

antonfirsov avatar Jun 19 '21 21:06 antonfirsov