Re: Views, scrolling, zoom and detail
Re: Views, scrolling, zoom and detail
- Subject: Re: Views, scrolling, zoom and detail
- From: Hamish Allan <email@hidden>
- Date: Thu, 13 May 2004 03:18:53 +0100
Many thanks again, guys!
Much as I would love to learn how to use OpenGL for this stuff, now is
unfortunately not the time. Amazingly enough it turns out that stroking
two bezier paths (enclosing the envelope of the sampled sound, one
point per pixel horizontally) is just as fast if not faster than
calling NSRectFill the equivalent number of times (on my G4 450,
without Quartz Extreme), and looks better on account of the
anti-aliasing.
http://www.synathome.pwp.blueyonder.co.uk/prescroll.png
Just as Allan said, I didn't need to use getRectsBeingDrawn:count:, and
Cocoa is smart enough only to ask for the part of the rect that was not
previously onscreen when you scroll across by less than a screenful.
However, I do have a drawing artifact that I wouldn't have expected.
For each scroll jump, there is a line between the two bezier paths.
http://www.synathome.pwp.blueyonder.co.uk/postscroll.png
This only happens with scrolling, not when resizing or changing zoom
level. I'm fairly sure I'm not drawing the line in any direct sense, as
I'm stroking both bezier paths from left to right. Does anyone know why
this is happening?
Thanks,
Hamish
_______________________________________________
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.