• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
cachImageInRect and Scrolling Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cachImageInRect and Scrolling Views


  • Subject: cachImageInRect and Scrolling Views
  • From: Joseph Jones <email@hidden>
  • Date: Fri, 4 Mar 2005 23:44:42 -0800

Hi all,

I was looking around the mail lists for a way to optimize the drawing of an overlay drag indicator when I cam across cacheImageInRect. Using this works 100% as intended for static (i.e. non-scrolling) views. What I need is a way to do the same thing but over a scrolling view. The graphic area I need to provide access to is much larger than the screen and is very rich (read expensive to re-draw).

There is one post that mentions a hack someone was trying to implement to deal with this but it appears to not be working very well. I am posting in hopes that someone out there has a solution to this situation since I hate to be stuck with such a non-performant portion of my application.

The current solution I have (in pseudo code) is as follows:

//Generate Update Rect...

[window restoreCachedImage];
[window discardCached Image];

[superView autoscroll:theEvent];*

[window cacheImageInRect:[self convertRect:updateRect toView:nil]];
[self lockFocus];
[self displayRect:updateRect];
[self unlockFocus];

[window flushWIndow];

When I drag to a point where scrolling occurs, though, garbage is left behind from my drag indicator. Scrolling back appears to paste old, incorrect information over the view.

Thanx,
joe

*I have also tried the following to see if the scrolling was just not being picked up (to no avail):

if ([superView autoscroll:theEvent])
{
	[window disableFlushWindow];
	[superView lockFocus];
	[superView displayRect:[self convertRect:updateRect toView:superView]];
	[superView unlockFocus];
	[window enableFlushWindow];
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • [SOLVED] Re: cachImageInRect and Scrolling Views
      • From: Joseph Jones <email@hidden>
  • Prev by Date: Re: Data Plotting info needed
  • Next by Date: Re: Force Refresh URL
  • Previous by thread: Re: Data Plotting info needed
  • Next by thread: [SOLVED] Re: cachImageInRect and Scrolling Views
  • Index(es):
    • Date
    • Thread