Contents

appendArc(withCenter:radius:startAngle:endAngle:clockwise:)

Appends an arc of a circle to the path.

Declaration

func appendArc(withCenter center: NSPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool)

Parameters

  • center:

    Specifies the center point of the circle used to define the arc.

  • radius:

    Specifies the radius of the circle used to define the arc.

  • startAngle:

    Specifies the starting angle of the arc, measured in degrees counterclockwise from the x-axis.

  • endAngle:

    Specifies the end angle of the arc, measured in degrees counterclockwise from the x-axis.

  • clockwise:

    True if you want the arc to be drawn in a clockwise direction; otherwise False to draw the arc in a counterclockwise direction.

Discussion

The created arc lies on the perimeter of the circle, between the angles specified by the startAngle and endAngle parameters. The arc is drawn in the direction indicated by the clockwise parameter. If the receiver’s path is empty, this method sets the current point to the beginning of the arc before adding the arc segment. If the receiver’s path is not empty, a line is drawn from the current point to the starting point of the arc.

Depending on the length of the arc, this method may add multiple connected curve segments to the path.

See Also

Appending Common Shapes to a Path