iPhone - creating Quartz paths on vector app?
Asked Answered
C

6

7

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

Cavil answered 13/9, 2010 at 3:16 Comment(0)
D
0

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.

Darb answered 13/9, 2010 at 3:27 Comment(1)
svg perhaps, but I saw today that what I need is an app that has convert the vector (svg perhaps) to quartz code that will create the drawings... unless I am wrong, but I don't see any format that can be used.Cavil
R
2

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.

Royer answered 13/11, 2010 at 14:18 Comment(3)
2) parse SVG (as used in the SVG spec itself) with basic CSS support into a piccolo2d (Java) scenegraph: code.google.com/p/piccolo2d/wiki/SvgSupportRoyer
especially code.google.com/p/piccolo2d/source/browse/piccolo2d.java/… Maybe we could join forces towards a SVG loading lib for quartz2d?Royer
(sorry for the stupidly cut comment, but stackoverflow doesn't permit to add more than one link at once)Royer
L
1

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.

Logical answered 24/1, 2014 at 4:47 Comment(0)
D
0

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.

Darb answered 13/9, 2010 at 3:27 Comment(1)
svg perhaps, but I saw today that what I need is an app that has convert the vector (svg perhaps) to quartz code that will create the drawings... unless I am wrong, but I don't see any format that can be used.Cavil
D
0

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

Darb answered 12/11, 2010 at 21:43 Comment(0)
T
0

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.

Tongue answered 6/8, 2012 at 18:21 Comment(2)
There is also a Quarkee Lite edition available for $4.99. I didn't have very good results with it though.Logical
@Logical and there is also PainCode, whopping $99! ... got it for $20 with a bundle of other apps :DTongue
M
0

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.

Malo answered 8/2, 2014 at 14:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.