How to draw a rectangle in a NSView
How to draw a rectangle in a NSView
- Subject: How to draw a rectangle in a NSView
- From: "Peter Karlsson" <email@hidden>
- Date: Sat, 25 Sep 2004 12:19:23 +0200
Dear list!
I wonder if someone can show me how to draw a rectangle in a NSView? This
is very new to me so I need some help to get started.
I found this example...
NSRect r = NSMakeRect(10, 10, 50, 60);
NSBezierPath *bp = [NSBezierPath bezierPathWithRect:r];
NSColor *color = [NSColor blueColor];
[color set];
[bp stroke];
...but I can not figure out where I select the view to draw on. I do not
want it to autodraw. I want to place the code in an action.
Peter
_______________________________________________
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