Sign in Join
FPDoc Onlineexperiment

Coords2Angles procedure

In unit GraphMath

Coords2Angles - convert the coords for Start and End Radial- Points into an Eccentric counter clockwise Angle and an Angle-Length.

Declaration

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

Description

Use Coords2Angles to convert the coords for Start and End Radial-Points, such as are used in the Windows API Arc Pie and Chord routines, into an Eccentric (aka Radial) counter clockwise Angle and an Angle-Length, such as are used in X-Windows and GTK.

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

Zero degrees is at the 3 o'clock position.

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