Pergunta

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

Foi útil?

Solução

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.

Outras dicas

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.

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.

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...

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.

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top