Re: Make a solid line look like 3D
Re: Make a solid line look like 3D
- Subject: Re: Make a solid line look like 3D
- From: Matthias Arndt <email@hidden>
- Date: Sun, 25 Oct 2009 22:44:49 +0100
Am 25.10.2009 um 19:50 schrieb I. Savant:
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.
Thanks for your response. I'm nearly convinced to look into the
gradients tomorrow, although I'm afraid it won't result in a better
performance: Empty the path, calculate the angle, create the rect
(with rounded edges), apply the gradient and fill the path ... vs.
three move to / line to ... I'll see.
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 ...
OpenGL to make some basic lines look somehow three-dimensional? Isn't
that over-kill? Sorry for my ignorance, I haven't coded OpenGL, yet,
and I am a bit reluctant to add it to my (already long) todo list for
this project ... But it would be interesting ... I'll have to make up
my mind :-)
Thanks again, Matthias
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden