On Thu, Jun 12, 2008 at 6:54 PM, Vikas <[EMAIL PROTECTED]> wrote: > NSRectFill() is a C function, not part of any class e.g. NSView. aRect is > simply a struct which specify location points (doesnt contain reference of > any window). How the function knows about the drawing surface, in which > window/surface to paint? Does it implicitly make use of some self pointer? > If so, then, what if this function is not called from inside a simple C > function then there will not be any self pointer?
This question is answered in some of the other posts answering your original question, so hopefully it will now be clear. Essentially, by the time your overridden version of -[NSView drawRect:] is called, the drawing subsystem which NSRectFill() uses already knows that your NSView is the target of the drawing operation. Hamish _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]