Re: draw and ... draw, not drawing
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