Author
Travis Kirton


Path

Yes. You can change the shape of a shape by changing it’s path property.

shape.path = someNewPath

Example

let small = Star(center: canvas.center, pointCount: 25, innerRadius: 50, outerRadius: 100)
let large = Star(center: canvas.center, pointCount: 25, innerRadius: 150, outerRadius: 100)
canvas.add(small)

let a = ViewAnimation(duration: 1.0) {
    small.path = large.path
    small.center = self.canvas.center
    small.fillColor = C4Pink
}
a.autoreverses = true
a.repeats = true
a.animate()