• 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: Display vs. LockFocus and draw
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display vs. LockFocus and draw


  • Subject: Re: Display vs. LockFocus and draw
  • From: Nathan Day <email@hidden>
  • Date: Tue, 30 Jul 2002 15:52:22 +0930

display will also get sub views to draw as well as the parts of it parent view that the view occupies, even if your image/drawing doesn't have any explicit transparency you will probably find you drawing still contains transparency due to aliasing. If you are trying to improve response when dragging try using setNeedsDisplayInRect: and make sure your view takes advantage of the NSRect parameter in drawRect:

On Tuesday, July 30, 2002, at 06:47 AM, Marco Binder wrote:

Hello everyone,

Another question... And let me apologize right away for 1) being kind of a
newbie and 2) preferring Java...

My question: what does NSView.display() do more than

NSView.lockFocus();
NSView.draw();
NSView.unlockFocus();

?

The problem is, that when I want to do drawing while dragging inside a view,
nothing will appear on the screen unless I send a display() message (or it9s
even enough to give a NSView.displayWhenNeeded() ).

Can I invoke myself whatever display() invokes in order to update the
screen?

Thanks for help,

Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
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: Display vs. LockFocus and draw
      • From: Marco Binder <email@hidden>
References: 
 >Display vs. LockFocus and draw (From: Marco Binder <email@hidden>)

  • Prev by Date: Re: Interface Builder question
  • Next by Date: Re[THE FIX]: _assign__t18string_char_traits1ZcRcRCc link undefined sym?
  • Previous by thread: Display vs. LockFocus and draw
  • Next by thread: Re: Display vs. LockFocus and draw
  • Index(es):
    • Date
    • Thread