Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - creating Quartz paths on vector app?

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

like image 991
Duck Avatar asked Sep 13 '10 03:09

Duck


2 Answers

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.

like image 197
Marcus Rohrmoser Avatar answered Nov 19 '22 05:11

Marcus Rohrmoser


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.

like image 1
bcattle Avatar answered Nov 19 '22 03:11

bcattle