Sign in Join
FPDoc Onlineexperiment

TWidgetSet.PolyBezier function

Member of TWidgetSetpublicIn unit InterfaceBase

Draws Bezier curves.

Declaration

pascal
function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; 
 Filled: Boolean; Continuous: Boolean): Boolean
 ; virtual

Arguments

DC

The device context.

Points

The array of points.

NumPts

The number of points in Points.

FilledTrue draws a Polygon.
ContinuousTrue uses the end-point as the starting point of the next segment.

Function result

False on failure.

Description

Use PolyBezier to draw cubic Bézier curves.

The first curve is drawn from the first point to the fourth point with the second and third points being the control points.

If the Continuous flag is True then each subsequent curve requires three more points, using the end-point of the previous Curve as its starting point.

If the Continuous flag is set to False, then each subsequent curve requires 4 additional points, which are used exactly as in the first curve.

If the Filled flag is set to True then a straight line is drawn from the last connected point to the starting point, and the entire curve is filled with the current brush.

Any additional points which do not add up to a full Bezier (4 for Continuous, 3 otherwise) are ignored. There must be at least 4 points to be connected.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.