Re: Faster Scroller
Re: Faster Scroller
- Subject: Re: Faster Scroller
- From: Andrew Pinski <email@hidden>
- Date: Thu, 23 Jan 2003 23:58:20 -0800
On Thursday, Jan 23, 2003, at 07:38 US/Pacific, Luca Torella wrote:
Hello,
someone could tell me how can I make the scrolling system of my
NSView faster?
My project can be downloaded here:
http://www.torellasoft.com/download/progetto.sit
I do not know if you got it to be faster but you loops should be:
int maxh;
h = NSMinY(rect)/zoom;
maxh = NSMaxY(rect)/zoom;
for ( ; h<=maxh ; h++) {
int maxl;
l = NSMinX(rect)/zoom;
maxl = NSMaxX(rect)/zoom;
for ( ; l<=maxl ; l++) {
}
}
and you should check that the rectangle which you are drawing
intersects with the drawRect that gets passed in.
Do not just check to see that you intersects because it is still slow
for large rows by columns.
Thanks,
Andrew Pinski
_______________________________________________
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.