function SmoothToBezier(const path: TPathD; closed: Boolean; tolerance: double; minSegLength: double = 3): TPathD; overload;
function SmoothToBezier(const path: TPathsD; closed: Boolean; tolerance: double; minSegLength: double = 3): TPathsD; overload;
This function replaces roughly curved sections of flattened paths with series of smooth Bezier curves. The returned path (or paths) is a series of consecutive Cubic Beziers where the end vertex of one Bezier becomes the start vertex of the next. (These can easily be converted back to flattened paths using the FlattenCBezier function).
This function is a very useful adjunct to the Vectorize function that's found in the Image32_Extra unit. Both functions are demonstrated in the VectorizeImages sample application.
Note 1: This function is based on "An Algorithm for Automatically Fitting Digitized Curves" by Philip J. Schneider as published in "Graphics Gems", Academic Press, 1990.
Note 2: This function is not to be confused with the TSmoothPath class in the Image32_SmoothPath unit.
Vectorize, TSmoothPath, FlattenCBezier
Copyright ©2019 Angus Johnson - Image32 ver. 2.22 - Documentation last updated on 3-April-2021