Search code examples
c#graphicsbeziercurve

thick bezier curve consist of lines in c#


I created bezier curve in C#. I compute result points of curve in some interval and I connect these points with a lines (g.drawLine). When I want curve which is 1px fat, all is right. But when I want thick this curve, occours problem. This problem is that connections individual lines is not pretty. Situation is ilustrate on zoom picture:

http://ryska.webzdarma.cz/bezier.png

Some tips how solve this problem? Thanks


Solution

  • Going by the mention of g.drawLine I would say this is WinForms. In that case, all you need to do is call

    Graphics.DrawLines

    instead of DrawLine. This will draw all the segments as one connected line.