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

Arc2Bezier

Converts an Arc and ArcLength into a Bezier Approximation of the Arc.

Declaration

Source position: graphmath.pp line 49

procedure Arc2Bezier(

  X: LongInt;

  Y: LongInt;

  Width: LongInt;

  Height: LongInt;

  Angle1: Extended;

  Angle2: Extended;

  Rotation: Extended;

  var Points: TBezier

);

Description

Use Arc2Bezier to convert an Arc and ArcLength into a Bezier approximation of the Arc. The Rotation parameter accepts a Rotation-Angle for a rotated Ellipse. For a non-rotated ellipse this value would be 0, or 360. If the AngleLength is greater than 90 degrees, or is equal to 0, it automatically exits, as Bezier cannot accurately approximate any angle greater then 90 degrees, and in fact for best result no angle greater than 45 should be converted, instead an array of Bezier's should be created, each Bezier describing a portion of the total arc no greater than 45 degrees.

The angles are specified in 1/16th of a degree. For example, a full circle equals 5760 (16*360).

Positive values in Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3 o'clock position.


Version 4.0 Generated 2025-05-03 Home