AuthorTravis Kirton
Tags filters
This example shows how you can apply a twirl filter to an image.
let filter = Twirl() //change filter settings img.apply(filter)
let image = Image("chop")! image.constrainsProportions = true image.width = canvas.width image.center = canvas.center canvas.add(image) var filter = Twirl() filter.center = Point(0.5, 0.5) filter.angle = 2*M_PI filter.radius = 200 image.apply(filter)