Please add Spline in GoStrokeStyle

Bezier is very difficult to programmly control the line path.

A Bezier curve is a type of spline.

Did you want something where the curve will go through all of the points? Or did you want a quadratic Bezier instead of a cubic one?
I don't understand what your needs are and what difficulties you are having.

I want the line going through all the control points so that it would be easy to programmly layout curved links.

In the current GoDiagram, if I want a curved link with specified layout or path, I need to call the SetPoint method. But SetPoint seems to set the control points on a Bezier link, which are not the points on the link.
So If I know the curve path, how can I get its control points? Or maybe there are better solutions to specifiy a curved link.
Please help me out of this.

Could you provide a picture of an example of the points you want to specify programmatically and what curve you would want as a result?

We used another drawing library before but not we are using GoDiagram. We have a lot of data files created by this old drawing library, in which the line path is described by points going through the line.

I'm creating a tool to convert these files to GoDiagram xml format. I need to keep the node position and the line path the same as in the old files.
So the situation is I know some of the points on a link but how can I create a Bezier GoLink going through these points?

That depends on what kind of curve your old library generated for those points. There are lots of possibilities.

OK, I should rephrase my question. Please forget previous posters.

If GoLink’s Style is Bezier, user can drag one of the two points (in the middle of the link) to change the link’s path. But the link’s path does not go through these two points.

My question is what should I do to make the link’s path go through these two points. I know there are a lot of possibilities, but I just want one of them, which is a smooth path.

Is the quadratic Bezier what I want? If so, which methods should I override in GoLink to implement quadratic Bezier?

There are lots of different ways for a curve to go through a set of points. That’s why I’m asking what kind of curve you wanted.

In any case, it's probably going to be non-trivial work.

Sorry for my limited knowledge of geometry. I want a visually smooth line passing through the four points, which are used in the current Bezier GoLink.

Yes, there are many possibilities, but I just want one of them.

I just want the one if you think it’s the easiest to implement.

Is it possible to do it by overriding some of the GoLink methods?

I just noticed in .NET Graphics class, there is DrawBezier method as well as DrawCurve method, the latter one is the one I want. The problem becomes if I use DrawCurve method to draw link’s path, could you give me some ideas how to implement link selection using mouse and how to respond the user drag on one of the control points?

OK, I did the minimum work to implement such a stroke class:
Please note that this is not product quality work, because it does not properly implement several methods, including ComputeBounds, ContainsPoint, and GetNearestIntersectionPoint, at least. However, it might be good enough for your purposes.
If you want it to inherit from GoLink, you'll also need to override CalculateStroke so that it naturally has the (at minimum 3) points you want. I haven't tried this.
There might be other issues I have overlooked, too. Support for SVG, for example.

Thank you very much indeed. I will try to make it work in my program. Hope this feature be added in later GoDiagram.