如何从文件(即SVG)创建CGPath [英] How to create a CGPath from a file — i.e. SVG
本文介绍了如何从文件(即SVG)创建CGPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以从给定的文件创建CGPath?
首选使用SVG,但是任何方法都可以。
SVG would be preferred, but anything will work.
推荐答案
似乎有一个更聪明的解决方案:
Seems like there is a more clever solution SVGKit:
SVGKit是一个可可框架,用于将SVG文件渲染为核心动画层。所有形状均由CAShapeLayer类的实例表示,并且根据设计可以设置动画。 SVGKit与最新的Mac OS X和iOS SDK兼容。
SVGKit is a Cocoa framework for rendering SVG files as Core Animation layers. All shapes are represented by instances of the CAShapeLayer class, and are, by design, animatable. SVGKit is compatible with the latest Mac OS X and iOS SDK's.
这篇关于如何从文件(即SVG)创建CGPath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文