I am a relative newcomer to this sort of stuff, but here's what I'm thinking:
First, I don't know of any class that would do what you want to do.
However, here is what I would start with: You have a collection of points, probably in two arrays, int xPoints and int yPoints, or maybe just in one array, points coords. If you want to make a smooth looking curve with this set of points, you need to focus on what determines the slope of the curve. That leaves you with two options: (1) you could try to use the drawArc method in Graphics class, fitting it to your points, or (2) you could draw your own curve based on the slope of the curve at the last endpoint and then the slope at the next endpoint.
I think the second strategy would be more precise, yet slower and more tedious to code, whereas the first may be easier to implement, but you won't have as much control.
If you could be more specific, that would be helpful.
Hope I haven't been too rambling.
Joined: Jun 29, 2004
Oh, I just re-read your post, and all you need is lines connecting the points! Ignore the above post in that case!
What I would do is use Graphics's drawLine method, implemented in a for loop.
Here's one way to connect the points with a curve. There may be many other or better ways. This takes five clicks on the drawing surface to get started.
The challenge is to figure out where/how to locate the control point for the quadTo method. With curveTo you have two control points to figure out.
[ August 01, 2004: Message edited by: Craig Wood ]
Joined: Jul 28, 2004
thanks, but I think this is not exactly what I need...
To the first answer from Ryan Smith :
The second post from you could maybe work, if I alter it.
I have already a curve that connects the Points together with lines. So far is everything fine.
The problem is that you have to switch in the program how to display the curve. So I have also to display the curve with rounded lines, and also as stairs.
To the answer from Craig Wood :
This seems to be a better idea (to work with a Path and the quadTo/curveTo- method) , but your code does not round the lines in the way I need it. As I said, the problem is to connect the points in a way, that there is a bended line, that displays the increase/decrease of the data.
I think your curves are something like the Bezier-curves....
If I would know how to get the right control-points for my curve, the problem would be solved, I think... [ August 02, 2004: Message edited by: Raschin Ghanad ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com