Re: Knowing if a scroll view is being scrolled
Re: Knowing if a scroll view is being scrolled
- Subject: Re: Knowing if a scroll view is being scrolled
- From: Half Activist <email@hidden>
- Date: Thu, 15 Feb 2007 17:34:23 +0100
Erik,
my view already uses copies on scroll.
This indeed works well, but only part of the view is copied, I mean,
my view can be really wide and high,
so when it scrolls on cached parts of the view it's ok, it's fast,
but as soon as it jumps out of the cached parts, it slows down.
When I do no draw shadings, scrolling is really fast.
For getRectsBeingDrawn I used to use it at the beginning, with no
benefits, because when scrolling, there is 1 rectangle redrawn.
Furthermore, to display the stuffs, I have to compute the bounding
rectangle of all rectangles being drawn, so I discarded it.
You know, i'm not drawing 5 shadings and evrything draws at 2fps,no,
i'm drawing several hundreds of them, and I know
this is the problem, that's why I want to disable it while
scrolling, because eye candy while scrolling is useless.
Regards.
On Feb 15, 2007, at 5:13 PM, Erik Buck wrote:
A delay of 0.0 should be enough to delay redarwing until after the
scrolling stops because the scroller will steal all events until
the user releases the mouse button.
However, I would not resort to drawing a degraded view until
every other option was explored. For example, try using
setCopiesOnScroll: and in drawRect: only the rects that you need to
draw: See draw - (void)getRectsBeingDrawn:(const NSRect **)rects
count:(int *)count. If you don't draw anything else, it may be
fast enough for live scroll at full quality.
See http://developer.apple.com/documentation/Cocoa/Conceptual/
NSScrollViewGuide/Articles/Basics.html
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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