Hi,
I have recently started programming on Mac using Objective-C and Cocoa. I am
coming from C++/C# world. So, its a fairly basic question. Please help me
understand the following code:
@implementation MyView /*MyView inherits from NSView */
-(void)drawRect: (NSRect)aRect {
On Jun 12, 2008, at 10:26 AM, Vikas wrote:
I have recently started programming on Mac using Objective-C and
Cocoa. I am coming from C++/C# world. So, its a fairly basic
question. Please help me understand the following code:
@implementation MyView /*MyView inherits from NSView */
Hi Vikas,
On Thu, Jun 12, 2008 at 6:26 PM, Vikas [EMAIL PROTECTED] wrote:
I have recently started programming on Mac using Objective-C and Cocoa. I am
coming from C++/C# world. So, its a fairly basic question. Please help me
understand the following code:
@implementation MyView
I have recently started programming on Mac using Objective-C and Cocoa. I am
coming from C++/C# world.
Recant, heretic! ;-)
In first line, I was expecting something like [self setColor:[NSColor
blackColor]]; (similar to this.color = NSColor.blackColor; in C#/C++)
how NSColor object
O'kay, that was helpful.
I still have one doubt. The declaration of NSRectFill is as below:
void NSRectFill (
NSRect aRect
);
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
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
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
On Thu, Jun 12, 2008 at 1: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
On 12 Jun 2008, at 10:54, Vikas wrote:
O'kay, that was helpful.
I still have one doubt. The declaration of NSRectFill is as below:
void NSRectFill (
NSRect aRect
);
NSRectFill() is a C function, not part of any class e.g. NSView.
aRect is simply a struct which specify location points
On 12 Jun '08, at 10:54 AM, Vikas wrote:
How the function knows about the drawing surface, in which window/
surface to paint?
There's always a current graphics context; it's global to each thread.
(See NSGraphicsContext if you want to look at its API; but if you're
looking for the
10 matches
Mail list logo