adamwulf / ClippingBezier

ClippingBezier calculates intersection points, paths, and shapes between two UIBezierPaths
http://getlooseleaf.com/opensource/
MIT License
256 stars 34 forks source link

Feature/union in demo #14

Closed adamwulf closed 3 years ago

adamwulf commented 3 years ago

luckily there's already a union algorithm that i'd forgotten that i wrote :)

notably, if either of the input paths is a different clockwise direction, then the union doesn't work as we'd intuitively think it would (since a reversed path would mean everything 'outside' the path is actually 'inside', etc)

both paths need to be clockwise, or both need to be counter-clockwise