Sign in Join
FPDoc Onlineexperiment

Angles2Coords procedure

In unit GraphMath

Converts an Eccentric Angle and an Angle-Length, into the coordinates for the Start and End radial Points.

Declaration

pascal
procedure Angles2Coords(X: Integer; Y: Integer; Width: Integer; 
 Height: Integer; Angle1: Extended; 
 Angle2: Extended; var SX: Integer; 
 var SY: Integer; var EX: Integer; 
 var EY: Integer)

Description

Use Angles2Coords to convert an Eccentric (Radial) angle and an angle-length, such as are used in X-Windows and GTK, into the coordinates for the Start and End radial Points. Like those used in the Arc, Pie, and Chord routines from the Windows API.

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.

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