Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes init() public for Circle and Polygon #631

Closed
wants to merge 1 commit into from
Closed

Conversation

traviskirton
Copy link
Collaborator

As a user I want to be able to create an empty Polygon, rather than an empty Shape. I want this because I can take advantage of how Polygon initializes differently than Shape.

func continuousLines() {
    let p = Path()
    let poly = Polygon()
    canvas.add(poly)
    canvas.addPanGestureRecognizer { location, translation, velocity, state in
        if state == .Began {
            p.moveToPoint(location)
        } else {
            p.addLineToPoint(location)
        }
        poly.path = p
    }
}

Same logic for Circle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants