One of the most enjoyable parts about learning Pascal, back in the 70s, was the use of syntax charts, rather than BNF. I have, however, been unable to find any widget that provides this capability (specifically, the ability to round off a vertex by inserting an arc of radius r of a circle located at some point (x,y)).
So, my question and idle thought takes two parts:
1) Is anyone aware of a tool that does this already (ie I can select such a widget, and set the radius of the circle, then draw the series of line segments, and have the vertices rounded off cleanly)? And if so, where can I find it?
2) If I do decide to create such a tool myself, how do I post progress and questions without taking up valuable space from those who have weightier issues to discuss? I suspect this will be a niche interest, but I know that my graphical programming experiences is approximately (nay, exactly) zero, and I know I will be looking for all sorts of assistance and coaching.
As a first take on how this tool would be used, after selecting the tool (and setting the appropriate radius), the first click of the mouse would specify the anchor point, and each subsequent click would add a new segment to the line. A double-click would terminate the process, and cause all the intervening vertices to be adjusted to a rounded position.
In terms of saving the final structure we would need a count of the line segments, and for each vertex, the radius of the circle used to smooth out the vertex. For most vertices, of course, this radius would be the same.
The process of creating the segmented line is started by the first click, and terminated by the double-click. I would imagine that a useful case would be if the shift-key were held down, thus constraining the angles at the vertices to being right-angles.
The movement of the mouse from one vertex to the next would be accompanied by the skinny line which I generally take to mean "this is where I am, right now", which line would, of course, disappear once the newly defined vertex is completed.
Some questions - with no basis for any answers as of yet:
1) Should I complete the rounding for each vertex as soon as possible (ie when I have defined the two lines that enclose the vertex), or shouldI wait until the whole set of line segments is defined, and then iterate over the set of vertices? This would save time and reduce the code path by eliminating too much calculation during event handling. OTOH, it would be a major visual wrench to see these sharp points suddenly assume an unaccustomed shapeliness due to curves being added!
2) If I have the skinny line showing "where I am, right now", how come the palette doesn't become full with skinny lines? I had never thought about this, but it's as if the line has to be calculated each time a MouseMove event is detected - and then destroyed to make way or the next mouse move. (Lots of research necessary on this!)
I hope this makes sense, and that some kind soul can point me in the ways in which I should travel!
Tony