The TSmoothPath class represents a path containing a series of cubic Bezier sub-curves (where a 'curve' can also be a straight edge).
Cubic beziers are defined by 4 points, two end points ('nodes') and two inner points ('control handles'). In TSmoothPath, however, these curves can be joined such that the last node of one sub-curve becomes the first node of the next to make a multi-curved path. TSmoothPath's standout feature is its ability to preserve smooth joins across sub-curves, not unlike Bezier splines, though with much more flexibility. This is accomplished by attributing to each node an additional field that can enforce smoothness where sub-curves join.
TSmoothType defines 4 types of curve join:
|stSmoothSym||symmetrical smoothness, where handles adjacent to the node will be equidistant from the node, and both handles and the node will be colinear|
|stSmoothAsym||asymmetrical smoothness, where handles adjacent to a node don't have to be equidistant, but both handles and the node will be colinear|
|stSharpWithHdls||adjacent handles are present and unrestrained|
|stSharpNoHdls||adjacent handles are 'hidden' in that they are locked at the same position as the node itself.|
When nodes are added to a TSmoothPath object, adjacent handles will added automatically at positions that reflect the node's TSmoothType. Also, when a node is moved, it's adjacent control handles will move with it. And when a handle is repositioned, its complementary handle will also be repositioned if the related node's SmoothType is stSmoothSym or stSmoothAsym.
See Examples/LayersAndSmoothPaths for a working example.
Copyright ©2019 Angus Johnson - Image32 ver. 3.2 - Documentation last updated on 15-September-2021