On Oct 25, 2009, at 2:42 PM, Matthias Arndt wrote:
My code draws lines some thousand times with different angles. I'd
like to have the lines to look similar to 3D objects. So currently I
draw each line segment three times:
1. one time with a thick line in black
2. the second time with a slightly thinner line in the current color
3. and a third time with a very thin white line (some kind of
highlighting)
How about creating 1 NSGradient instance for each color you want,
then creating one bezier path for each line. The path would describe
the outer edges of the pipe, then you'd *fill* it with the gradient at
the desired angle, rather than stroking.
If you need better performance than that, you should seriously
consider OpenGL. In fact, you should be kind to your users' batteries
and processor loads (you *are* considering laptops, aren't you?) and
consider OpenGL anyway. It'd make quick and light work of this by
comparison ...
--
I.S.
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]