iPhone - 在矢量应用程序上创建 Quartz 路径?

发布于 2024-09-18 10:48:29 字数 211 浏览 11 评论 0原文

我梦想能够使用 Illustrator 创建矢量对象并将它们导出为石英路径。这可能吗?

它需要是 Quartz 路径,因为我希望能够用颜色、渐变等填充路径。

我该怎么做?有没有办法从 illustrator 或此类应用程序导出(?)并在 Xcode 上导入路径以在 iPhone/iPad 上使用?

有没有可以转换它们的库或应用程序?

提前致谢

I dream of being able to use Illustrator to create my vectorial objects and export them as quartz paths. Is that possible?

It needs to be as Quartz paths because I would like to be able to fill the paths with colors, gradients, etc.

How do I do that? Is there a way to export (?) from illustrator or such apps and import paths on Xcode to use on iPhone/iPad?

Is there any library that can convert them or app for that matter?

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

递刀给你 2024-09-25 10:48:29

我前段时间做了一些实验性的 SVG 加载:

1)将 SVG 路径解析为 CGPathRefs: https://github.com/mro/MROGeometry/blob/master/PathParser.h - 大部分用纯 C 编写。

I've done a some experimental SVG loading some time ago:

1) parse SVG paths into CGPathRefs: https://github.com/mro/MROGeometry/blob/master/PathParser.h - mostly written in plain C.

甜宝宝 2024-09-25 10:48:29

最成熟的库是 SVGKit。它加载 SVG 文件的方式与 UIKit 加载 PNG 的方式相同,并在 CAShapeLayers 中绘制它。然而,它确实意味着每次您想要绘制图像时它都会解析 XML 树。

The most mature library for this is SVGKit. It loads an SVG file the same way UIKit can load a PNG, and draws it in CAShapeLayers. However it does mean that it parses an XML tree every time you want your image drawn.

亣腦蒛氧 2024-09-25 10:48:29

我在谷歌上环顾四周,发现 this 它看起来很有前途,并且有一个关于加载 EPS 的部分,EPS 是一种从 illustrator 导出的格式。请参阅第 16 章。如果这不起作用,您可以随时创建自己的简单格式和编辑器来执行简单的路径和操作。

I looked around on google and found this It looks pretty promising and has a section on loading EPS, a format exported from illustrator. Look at chapter 16. If this does not work you can always look at creating your own simple format and editor to do simple paths and things.

挥剑断情 2024-09-25 10:48:29

嘿,我知道已经有一段时间了,但我找到了一个可以打开 SVG 的!!它有点挑剔,只支持某些部分(规格在同一页上),但一定要检查一下! https://github.com/cmkilger/CKSVG
我希望你能尽快得到这个...

Hey I know its been a while but I found one that will open SVG!! It is a little finicky and only supports some parts (specifications are on the same page) but be sure to check it out! https://github.com/cmkilger/CKSVG
I hope you get this soon...

泼猴你往哪里跑 2024-09-25 10:48:29

这个问题似乎仍然很活跃,这就是我最终寻找适用于 iOS 的 SVG 解决方案的地方。我不得不浪费一些时间找到Qwarkee

我还没买,不过我很快就会买。它说它完全符合您在这里的要求。 SVG 到 Quartz 2D .. 价格为 39.99 美元。价格过高?我认为不是。

This question still seems to be active, and it's where I ended up searching for an SVG solution for iOS. I had to waste some time to find Qwarkee.

I haven't bought it yet, however, I soon will. It says that it does exactly what you are asking for here. SVG to Quartz 2D .. for $39.99. Over-priced? Not, in my opinion.

世俗缘 2024-09-25 10:48:29

我发布了 SVGgh 一个库,用于将 SVG 文件渲染为视图、按钮并导出为 PDF。它包含将 SVG 路径转换为 ​​CGPathRef 的代码。

I've published SVGgh a library to render SVG files to views, buttons and out to PDF. It includes code to convert an SVG path to a CGPathRef.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文