swhitty / SwiftDraw

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

Missing support for clipPath #37

Open alessiolapenna opened 10 months ago

alessiolapenna commented 10 months ago

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

swhitty commented 5 months 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 🤯.

ERussel commented 2 weeks ago

Hey everyone! @swhitty Also found not working case related to the clipPath, I think. Here is the image link that is decoding improperly by SwiftDraw but can be decoded in right way using SVGKit.