• 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
Re: Invalidating Rects for redraw
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalidating Rects for redraw


  • Subject: Re: Invalidating Rects for redraw
  • From: David Martin <email@hidden>
  • Date: Fri, 26 Jul 2002 10:02:47 +0200

On Tuesday, July 23, 2002, at 11:41 , Richard Schreyer wrote:

It seems that when you roll over a link, the area of that link is marked for redraw (highlight color, whatever...), and the progress text in the lower left is also marked for redraw (to display the new URL).

The problem is that Cocoa appears to be unioning these rects, meaning that much more is being redrawn than needs to be. If you roll over a link near the top of a page, almost the entire page needs to be redrawn.

I've found indeed that sending a [self setNeedsDisplayInRect:aRect] to a NSView, and then a [self setNeedsDisplayInRect:anotherRect] will actually redraw a single rectangle containing the two smaller rectangles.

My workaround was to call [self displayRect:aRect], then [self displayRect:anotherRect]. The documentation seems to want people to call -setNeedsDisplayInRect: and let the view redraw itself when it wants it, but the thing looks terribly inefficient

Bye,
David
_______________________________________________
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.

  • Follow-Ups:
    • Re: Invalidating Rects for redraw
      • From: Ondra Cada <email@hidden>
References: 
 >Invalidating Rects for redraw (From: Richard Schreyer <email@hidden>)

  • Prev by Date: Find By Content
  • Next by Date: Re: Programmatic layout and creating round buttons?
  • Previous by thread: Invalidating Rects for redraw
  • Next by thread: Re: Invalidating Rects for redraw
  • Index(es):
    • Date
    • Thread