Circle

public class Circle: Ellipse

Circle is a concrete subclass of Ellipse that has a special initialzer that creates a uniform ellipse.

  • Creates a circle.

    let c = Circle(center: canvas.center, radius: 50)
    canvas.add(c)
    

    Declaration

    Swift

    convenience public init(center: Point, radius: Double)

    Parameters

    center

    The center-point of the circle

    radius

    The radius of the circle