.NET GDI+: Drawing lines with rounded corners

后端 未结 3 953
名媛妹妹
名媛妹妹 2021-01-21 09:52

Given an array of points, it is easy to draw a line based on these, e.g. using the GraphicsPath class.

For instance, the following array of points...

[0]         


        
3条回答
  •  离开以前
    2021-01-21 10:24

    Bezier curves are pretty straightforward to implement:

    http://www.codeproject.com/KB/recipes/BezirCurves.aspx

    Luckily you also have them as part of the GraphicsPath class if you wanna omit the gory details:

    http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.graphicspath.addbezier.aspx

    And you can also look into splines:

    http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.graphicspath.addcurve.aspx

提交回复
热议问题