szymonkaliski / Pathcut

CGPath intersections for iOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pathcut

Pathcut adds intersect to CGPath, a function that returns the subpaths emerging from the intersection of two CGPaths. It uses a mixed approach: for lines and quadric curves it analytically solves the intersections and for cubic curves it uses an aproximation algorithm.

let result = path.intersect(with: otherPath)
// result is an array of CGPaths

About

CGPath intersections for iOS and macOS


Languages

Language:Swift 100.0%