Sign in Join
FPDoc Onlineexperiment

TCanvas.AngleArc procedure

Member of TCanvaspublicIn unit Graphics

Draws a circular arc over a specified angle.

Declaration

pascal
procedure AngleArc(X: Integer; Y: Integer; Radius: LongWord; 
 StartAngle: Single; SweepAngle: Single)

Arguments

X

Horizontal coordinate of the center of the circle.

Y

Vertical coordinate of the center of the circle.

Radius

Distance from the center point to the circumference of the circle.

StartAngle

Angle (in degrees) relative to the X-Axis where the arc is started.

SweepAngle

Angle (in degrees) relative to StartAngle where the arc ends.

Description

AngleArc is a method used to draw an arc over a specified angle along the circumference of a circle with given radius and center point.

X and Y contain the coordinates of the center of the circle along which the arc is drawn.

Radius is the distance from the center point of the circle to the circumference where the arc is drawn. The LongWord type can contain positive integer values in the range 0..4294967295.

StartAngle and SweepAngle indicate where the arc is drawn on the circumference of the circle. The angle values are specified in degrees.

StartAngle contains the angle to the starting point on the circumference. Its value is relative to the X-Axis and increments in counter-clockwise direction.

SweepAngle defines the length of the arc expressed in degrees, and is used to find the ending point for the arc. Its value is relative to the starting point, and increases in counter-clockwise direction.

Before the arc is drawn, LineTo is used to drawn a line from the current pen position to the starting point of the arc.

The Arc method is called to render the arc using the center point, radius, starting point, and ending point values.

After the arc is drawn, the Pen position is moved to the ending point for the arc.

Update values for the Pen style, mode, color or width prior to calling the method.

See also

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