Arrowed Lines in Freehand Drawing Library
Drawing lines does not sound very interesting, but in addition to my own app. development, another user expressed a desire for animated arrowed lines. So, a new two-point stroke has been added to the library. The TwoPoint class is the base for a family of classes in which a stroke is defined only by a starting point and the current mouse/touch point.
In keeping with the FDL architecture, an engine is assigned to a two-point stroke. Two engines will be provided in the first release candidate, arrowed lines and arcs. The start and end arrows are optional, so these engines provide a back-door to drawing lines and arcs. Not sexy, but the existing line decorators are applicable, so it’s incredibly easy to draw dotted or dashed lines.
Since the point sequence to a stroke may be simulated in an animation, it’s now very easy to draw animated dashed or solid, arrowed lines. Here is a screen shot from one of the demos.
Injecting a new line decorator is a matter of assigning the fully qualified class name of the decorator,
__data.lineDecorator = “net.algorithmist.freehand.decorators.SolidLine”;
__data.lineDecorator = “net.algorithmist.freehand.decorators.DashedLine”;
then, re-assign the stroke’s data provider,
__stroke.data = __data;
There are still a couple beta slots open, so if you are interested in developing a Flex-based application (mobile or otherwise) involving freehand drawing, please contact me at theAlgorithmist [at] gmail [dot] com. There is a small, three-figure license fee that is a one-time cost. Beta users get free upgrades for life!
I’ll be posting a roadmap for the anticipated release cycle shortly, so even if you are not interested in Flex/Actionscript development, say tuned. A subset of the Freehand Drawing Library may be coming for JS or Corona developers.