How to encode UIBezierPath to SVG?

感情迁移 提交于 2019-12-08 02:53:51

问题


I have a simple view for finger painting / drawing. I store the drawings as UIBezierPaths in a NSMutableArray. Now I want to transfer the drawings to a web-service for presenting them in a browser. Therefore I need to encode my UIBezierPaths in a SVG-file - because this the format of the web-service.

What I found right now is the SVGKit, which only DECODES SVG. Do anybody know sample code, snippets or a framework for encoding SVG?

Thank you.


回答1:


I tested yet. but using following steps: Would not it be possible?

1.UIBezierPath to CGPathRef. UIBezierPath to CGPathRef

2.Using a MROGeometry CGPathRef To SVG.



来源:https://stackoverflow.com/questions/14785344/how-to-encode-uibezierpath-to-svg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!