• 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: draw and ... draw, not drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: draw and ... draw, not drawing


  • Subject: Re: draw and ... draw, not drawing
  • From: Scott Anguish <email@hidden>
  • Date: Sat, 25 Feb 2006 02:22:44 -0500


On Feb 24, 2006, at 3:28 PM, Shawn Erickson wrote:

         [self lockFocus];
         [dropImage drawAtPoint:drawLocation fromRect:NSZeroRect
operation:NSCompositeSourceOver fraction:1.0];
         [self unlockFocus];
         [self setNeedsDisplay:YES];

}

You likely are drawing the image ok in the above (not a good way to try to do it) but very soon afterwards you are redrawing your entire NSView subclass which will clobber what you did draw.


actually, drawing outside of the drawRect: method like this (although without the immediate setNeedsDisplay:) is allowed. And drag and drop is one case where you might find a win in doing this (assuming that the thing you drop stays on top of the view)... but you would need to ensure that you were able to redraw it in the drawRect: routine in the future (which this does not do)



_______________________________________________ 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
References: 
 >draw and ... draw, not drawing (From: Michael Hanna <email@hidden>)
 >Re: draw and ... draw, not drawing (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: draw and ... draw, not drawing
  • Next by Date: Re: using NSMutableDictionary in place of NSDictionary
  • Previous by thread: Re: draw and ... draw, not drawing
  • Next by thread: Re: draw and ... draw, not drawing
  • Index(es):
    • Date
    • Thread