swhitty / SwiftDraw

Swift library and command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code.
zlib License
326 stars 41 forks source link

Missing support for clipPath #37

Open alessiolapenna opened 5 months ago

alessiolapenna commented 5 months ago

From what I could see and test, there is no support for clipPath. Is it planned to be added?

swhitty commented 1 month ago

Hi @alessiolapenna, to clarify — SwiftDraw does support clip paths when rasterizing an SVG, but not when outputting an SFSymbol.

This is because SFSymbols themselves do not support clip paths, so one must manually divide and removes paths outside the clip then create the symbol. I am interested in supporting this within SwiftDraw in the future, but it does require some complex boolean operations of bezier paths 🤯.