Hello,

I'm trying to draw shapes, and have read the Quartz 2D graphics guide.
I can draw things like a romantic "heart" shapes [1] using NSBezier curves,
with methods like  CGContextAddCurveToPoint.

However this is quite difficult to draw by numbers. I would like to draw my
shapes
in something like Illustrator or Photoshop and then export the Path as a
vector path,
.AI or .EPS, and then convert that in to a set of points for NSBezier Path
to use.

Is anyone aware of a tool that will do that?
Or is there any other way to import a curve path in to Quartz, without
having to define
it manually in code?

Thanks,

Paul

[1]
 // construct and draw a heart shaped path
 CGContextSetStrokeColorWithColor(context, [UIColor blackColor].CGColor);
 CGContextSaveGState(context);
 float kHalfSize = 200.0;
 CGContextTranslateCTM(context, kHalfSize / 2, kHalfSize / 2);
 CGContextMoveToPoint(context, 0, 21);
 CGContextAddCurveToPoint(context, -16, 49.8,-53.2, 41.0, -49.6, 5.8);
 CGContextAddCurveToPoint(context, -46, -29.4,-9.4, -53.4, 0, -69.8);
 CGContextAddCurveToPoint(context, 9.4, -53.4,46, -29.4, 49.6, 5.8);
 CGContextAddCurveToPoint(context, 53.2, 41, 16, 49.8, 0, 21);
 CGContextClosePath(context);
 CGContextStrokePath(context);
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to