Xcode 7.3: NSBezierPath and CGPathRef don't interoperate, which makes CAShapeLayer sad

Originator:kusterer
Number:rdar://26055409 Date Originated:03-May-2016 04:05 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.3 (7D175)
Classification:Serious Bug Reproducible:Always
 
CAShapeLayer only works with CGPathRef objects. Most of AppKit wants me to use NSBezierPath. I now have the choice of either switching all my AppKit code to CGPathRef (until I run into API that requires NSBezierPath), or to manually convert by iterating over the path's segments and generating a new one. Even if, internally, this part for some reason hasn't been unified yet, wouldn't it be better to add these conversion functions to the OS, so app developers don't constantly have to reinvent and debug that code themselves?

Alternately, could you at least lessen our pain and change CAShapeLayer to also work with NSBezierPaths, or add an NSShapeLayer that does?

Thanks!

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!