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

Public init #630

Closed
wants to merge 15 commits into from
Closed

Public init #630

wants to merge 15 commits into from

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.

@alejandro-isaza alejandro-isaza deleted the PublicInit branch March 1, 2016 02:17
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