Vcl.Graphics.TCustomCanvas.PolyBezier

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure PolyBezier(const Points: array of TPoint); virtual; abstract;

C++

virtual void __fastcall PolyBezier(const System::Types::TPoint *Points, const System::NativeInt Points_High) = 0 ;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TCustomCanvas

Description

Draws a set of Bezier curves.

Override the PolyBezier method to implement drawing cubic Bezier curves using the endpoints and control points specified by the Points parameter. The first curve is drawn from the current position to the third point, using the first and second points as control points. Each subsequent curve in the sequence needs exactly three more points, and uses the ending point of the previous curve as the starting pointfor the next. The next two points in the sequence are control points, and the third is the ending point. PolyBezier draws lines by using the current pen.

The Points parameter gives the endpoints to use when generating the Bezier curves.

Note: In Delphi, you can use the Slice function to pass a portion of an array of points to the PolyBezier method. For example, to form a Bezier curve using the first ten points from an array of 100 points, use the Slice function as follows: Canvas.PolyBezier(Slice(PointArray, 10));

Control points after a[Index+3] are ignored. Nothing happens if there are not enough control points.

See Also