TCanvas.Chord procedure
Draws a filled chord shape starting and ending at the specified angular positions on the circumference of an ellipse. This shape consists of an elliptical arc and a straight line connecting the start and end points of the arc.
Declaration
procedure Chord(x1: Integer; y1: Integer; x2: Integer; y2: Integer;
Angle16Deg: Integer; Angle16DegLength: Integer); virtual
; reintroduce
procedure Chord(x1: Integer; y1: Integer; x2: Integer; y2: Integer;
SX: Integer; SY: Integer; EX: Integer; EY: Integer)
; virtual; reintroduceArguments
x1 | Horizontal coordinate on the canvas where the Chord is located. |
y1 | Vertical coordinate on the canvas where the Chord is located. |
x2 | Horizontal coordinate on the canvas where the Chord is located. |
y2 | Vertical coordinate on the canvas where the Chord is located. |
Angle16Deg | Ellipse parameter identifying where the chord begins (given in 1/16th of a degree). |
Angle16DegLength | Ellipse parameter identifying the length of the chord (given in 1/16th of a degree). |
SX | Horizontal coordinate which defines the radial starting point for the chord. |
SY | Vertical coordinate which defines the radial starting point for the chord. |
EX | Horizontal coordinate which defines the radial ending point for the chord. |
EY | Vertical coordinate which defines the radial ending point for the chord. |
Description
Use Chord to draw a chord shape on the canvas. The enclosed area is filled by the current Brush of the canvas, the outline is drawn by the current Pen.
The full ellipse from which a part is used for the arc is enclosed by the rectangle given by the corner coordinates x1 (left), y1 (top), x2 (right), y2 (bottom).
The angles Angle16Deg and Angle16DegLength define the position and length of the arc on the circumference of the ellipse. They are given in 1/16th of a degree. For example, a full circle equals 5760 (16*360).
Positive values of Angle16Deg and Angle16DegLength mean counter-clockwise while negative values mean clockwise directions. Zero degrees is at the 3 o'clock position.
Alternatively the starting and ending points may be specified as radial points (SX, SY, EX, EY). These points do not necessarily have to be elements of the arc itself. Instead, the intersection of the lines between the ellipse center and the points (SX, SY) and (EX, EY) with the ellipse define the arc's start and end points, respectively.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
