Drawing complex vector shapes
Drawing complex vector shapes
- Subject: Drawing complex vector shapes
- From: Matt Budd <email@hidden>
- Date: Mon, 1 Dec 2003 13:05:51 -0700
Hi..
We're creating a vector drawing program, but we want to able to do some
pretty cool stuff with the vector paths (like gradients, transparent
fills, outlines, shadows). We got a prototype with the complex drawing
of all these shapes (using NSBezierPaths), but I was wondering if
anyone had information on the best way to do the specific effects we're
confronting right now:
Gradients: Seems like CGShading has what I need, but can I use this to
fill a NSBezierPath, or just a rect? The web doesn't have much in the
way of sample code, so if anyone can point me in the right direction
(or some sample code), that'd be great...
Shadowing: Seems like an iterative repeating of the outline with a
shift of each iteration down and to the right and reduce it's opacity.
However, this would mean that for each shape, I'd fill it once, but
stroke it 6 times...inherent performance hit?
Also, we're looking at possibly using cross-platform Qt
(
http://www.trolltech.com) with OpenGL for the graphics (Qt's internal
graphic stuff is quite lacking). I was wondering if anyone had gone
down the route of using OpenGL for its 2D drawing effects, and if they
thought that was comparable to Cocoa/Quartz graphics (which I think
look amazing for the amount of code you have to write).
Thanks for any info...I really appreciate it.
- Matt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.