adamwulf / ClippingBezier

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

Mac Compatibity #28

Open Rajkiran93 opened 1 year ago

Rajkiran93 commented 1 year ago

Hi Adam, How to port this for the Mac app? Thanks

adamwulf commented 1 year ago

I think it'd need a fair bit of work to port to Mac use. The biggest change would be moving all UIBezierPath to NSBezierPath, ideally something like:

#if TARGET_OS_IPHONE
#define BezierPathClass UIBezierpath
#else
#define BezierPathClass NSBezierpath
#endif

and then replacing all UIBezierPath with BezierPathClass. The same would need to be done for PerformanceBezier too. That'd get a fair bit of the way there.