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 Img32.Extra unit. Both functions are demonstrated in the VectorizeImages sample application.
Note: This function is based on "An Algorithm for Automatically Fitting Digitized Curves" by Philip J. Schneider as published in "Graphics Gems", Academic Press, 1990.
Copyright ©2019 Angus Johnson - Image32 ver. 4.0 - Documentation last updated on 20-January-2022