Drawing into custom view from another object
Drawing into custom view from another object
- Subject: Drawing into custom view from another object
- From: Nikita Zhuk <email@hidden>
- Date: Thu, 22 Aug 2002 01:46:57 +0300
Hi there,
I have a custom view (a subclass of NSView, named "theView"), and I
would like that another object would be able to draw NSBezierPaths
into that view. This another object (let's call it "theShip") is a
subclass of NSObject, so calling mePath = [NSBezierPath
bezierPathWithRect:myRect]; and [mePath fill]; doesn't do a thing, of
course (as it would in subclass of NSView). In a NSView subclass I
would draw a simple blue rect like this:
[[NSColor blueColor] set];
myRect = NSMakeRect(x,y,20,20);
meBpath = [[NSBezierPath bezierPathWithRect:myRect] retain];
[meBpath fill];
So the question is, how can I draw things from theShip's function
into theView? This is probably a pretty basic question, but I didn't
find any helpful messages from mailing list archive.
--
******************************
* Nikita Zhuk
* MacZ Software
* WWW:
http://www.maczsoftware.com
* E-mail: email@hidden
******************************
_______________________________________________
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.