Ondřej Ryška
Ondřej Ryška

Reputation: 491

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

Upvotes: 0

Views: 463

Answers (2)

Rotem
Rotem

Reputation: 21927

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.

Upvotes: 1

paul
paul

Reputation: 22001

You could try making your curve out of several LineSegment objects, and specify IsSmoothJoin = true;

Upvotes: 1

Related Questions