Unit BezierTools

Classes

Functions

Bezier - ***************************************************************************** This code illustrates the use of Bezier curves and simple usage of PATHS.
FilledBezier - ***************************************************************************** Ensure that enough points are provided.

Types

Constants

Variables


Functions


Procedure Bezier(Canvas : TCanvas; Const Points : Array Of TPoint);

***************************************************************************** This code illustrates the use of Bezier curves and simple usage of PATHS. // I felt it was about time that there were some examples on how to use some of the undocumented features of the graphics API. Its a shame that Borland declined implmenting these features, most of them are fairly straight forward, as can be seen here. // The FilledBezier procedure illustrates how you can combine features of the graphics API to provide otherwise un-available features. It uses a Path to create a filled Bezier curve. (PolyBezier curves are not filled.) // Several routines are included here to simplify the drawing of Bezier curves. // This code is public domain, with the request that credit be given to the original author. // Written By Clinton R. Johnson, March, 1998

***************************************************************************** n Bezier curves require 3n+1 points, if we don't provide that many, the drawing will fail.


Procedure FilledBezier(Canvas : TCanvas; Const Points : Array Of TPoint);

***************************************************************************** Ensure that enough points are provided. Each Bezier requires 4 points. A start and finish point, and 2 tension points. It is possible to draw more than 1 bezier at a time. You provide the first 4 pointsa as normal, and then 3 more points for each curve - 2 tension points and a finish point. Additional Bezier points start at the same point as the previous curve finished, so you don't redeclare the point. // Ie : Bezier(Canvas,[Point(1,1),Point(4,2),Point(10,3),Point(12,4)]); Bezier(Canvas[Point(12,4),Point(22,5),Point(3,6),Point(15,7)]); // is the same as // Bezier(Canvas,[Point(1,1),Point(4,2),Point(10,3),Point(12,4), Point(22,5),Point(3,6),Point(15,7)]); // NOTE : PolyBezier is never filled.

Types


Constants


Variables