[Overview][Types][Procedures and functions][Index] Reference for unit 'GraphMath' (#lazutils)

PolyBezierArcPoints

PolyBezierArcPoints - convert an Arc and ArcLength into a Pointer Array of TPoints for use with Polyline or Polygon.

Declaration

Source position: graphmath.pp line 97

procedure PolyBezierArcPoints(

  X: LongInt;

  Y: LongInt;

  Width: LongInt;

  Height: LongInt;

  Angle1: Extended;

  Angle2: Extended;

  Rotation: Extended;

  var Points: PPoint;

  var Count: LongInt

);

Description

Use PolyBezierArcPoints to convert an arc between two angles Angle1 and Angle2 into a pointer array of TPoints for use with Polyline or Polygon. The Rotation parameter accepts a rotation angle for a rotated ellipse - for a non-rotated ellipse this value would be 0, or 360*16.

The result is an approximation based on 1 or more Beziers. If the angle length is greater than 45*16 degrees, it recursively breaks the arc into arcs of 45*16 degrees or less, and converts them into beziers with BezierArcPoints. The angles are 1/16th of a degree. For example, a full circle equals 5760 (16*360).

Positive values in Angle1 and Angle2 mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position. Points is automatically initialized, so any existing information is lost, and the array starts at 0. Points should ALWAYS be freed when done by calling to ReallocMem(Points, 0).


Version 4.0 Generated 2025-05-03 Home