How do I render thick 2D lines as polygons?

前端 未结 9 1248
心在旅途
心在旅途 2020-12-12 18:17

I have a path made up of a list of 2D points. I want to turn these into a strip of triangles in order to render a textured line with a specified thickness (and other such th

9条回答
  •  忘掉有多难
    2020-12-12 18:48

    I just found this amazing work:

    http://www.codeproject.com/Articles/226569/Drawing-polylines-by-tessellation

    It seems to do exactly what you want, and its licence allows to use it even in commercial applications. Plus, the author did a truly great job to detail his method. I'll probably give it a shot at some point to replace my own not-nearly-as-perfect implementation.

提交回复
热议问题