[Overview][Types][Procedures and functions][Index] |
BezierArcPoints - convert an Arc and ArcLength into a Pointer Array of TPoints for use with Polyline or Polygon
Source position: graphmath.pp line 61
procedure BezierArcPoints( |
X: LongInt; |
Y: LongInt; |
Width: LongInt; |
Height: LongInt; |
Angle1: Extended; |
Angle2: Extended; |
Rotation: Extended; |
var Points: PPoint; |
var Count: LongInt |
); |
Method: BezierArcPoints
Params: X, Y, Width, Height, Angle1, Angle2, Rotation, Points, Count Returns: Nothing Use BezierArcPoints to convert an Arc and ArcLength 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. The result is an Aproximation based on 1 or more Beziers. If the AngleLength is greater than 90 degrees, it calls PolyBezierArcPoints, otherwise it Converts the angles into a Bezier by calling to Arc2Bezier, and then converts the Bezier into an array of Points by calling to Bezier2Polyline. The angles are 1/16th of a degree. For example, a full circle equals 5760 (16*360). Positive values of Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position. If Points is not initialized or Count is less then 0, it is set to nil and the array starts at 0, otherwise it tries to append points to the array starting at Count. Points should ALWAYS be Freed when done by calling ReallocMem(Points, 0) or FreeMem.
lazarus-ccr.sourceforge.net |