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 ('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.

The TSmoothType field 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 handles will move with it. And when a handle is repositioned, its complementary handle may also be repositioned (unless TSmoothPath's AutoAdjust property has been disabled).

See Examples/LayersAndSmoothPaths for a working example.


Methods Properties
In TSmoothPath:
Add AutoAdjust
Assign Count
AssignTo CtrlPoints
Clear FlattenedPath
DeleteLast LastType
Offset Points
Rotate PointTypes

See Also

TSmoothPoint, TSmoothType