Middlepoint on a curve created by AddPathCurve
Posted: Mon Feb 22, 2016 2:41 pm
Guys,
for my tool ProcDOT I switched to the new VectorDrawing library (which is great, btw.) to draw those bezier-curved graph-edges. So far so good, though I needed some time to understand how to use the AddPathCurve instruction for a curve with an undefined number of points, I now have a problem that I seem to find no/to be able to develop a solution for: I need to find the middle of such a curved path - actually I need the middlepoint ON the path. There I want to put the label of the edge. And this brings up another problem: I furthermore need to rotate/fit the label (which is text) to this middlepoint to perfectly fit the curve. The most awesome thing would be to have the label (text) following the curved path right in the middle. However, if that's not enough, another thing is that the solution would need to have a performance which is top and - last but not least - it needs to run on Windows and Linux as well.
Any ideas how to accomplish this task?
Thx in advance,
Didelphodon
for my tool ProcDOT I switched to the new VectorDrawing library (which is great, btw.) to draw those bezier-curved graph-edges. So far so good, though I needed some time to understand how to use the AddPathCurve instruction for a curve with an undefined number of points, I now have a problem that I seem to find no/to be able to develop a solution for: I need to find the middle of such a curved path - actually I need the middlepoint ON the path. There I want to put the label of the edge. And this brings up another problem: I furthermore need to rotate/fit the label (which is text) to this middlepoint to perfectly fit the curve. The most awesome thing would be to have the label (text) following the curved path right in the middle. However, if that's not enough, another thing is that the solution would need to have a performance which is top and - last but not least - it needs to run on Windows and Linux as well.
Any ideas how to accomplish this task?
Thx in advance,
Didelphodon