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: Paul M <email@hidden>
- Date: Mon, 26 Oct 2009 12:07:19 +1300
On 26/10/2009, at 10:44 AM, Matthias Arndt wrote:
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 :-)
If I had to guess, I'd say that you only see it as overkill because you
know nothing about it - it's new and scary and you dont understand it.
In fact it's simply another technology. Dont think "is it overkill?"
think "is it the right tool for the job?".
Based on the facts presented - preformance is an issue, and, it's a
screensaver - I would guess that it certainly may well be just the tool
for the job.
As I.Savant indicated, screensavers should be low impact - personally,
if a screensaver uses more that about 10-15% cpu, I'll ditch it
imediately, no matter what it looks like.
paulm
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