Trouble drawing a polygon...
Trouble drawing a polygon...
- Subject: Trouble drawing a polygon...
- From: "Brian O'Brien" <email@hidden>
- Date: Tue, 26 Apr 2005 14:29:05 -0600
My first polygon! :)
But nothing is drawing....
NSPoint p;
int i;
NSBezier * path = [NSBezierPath alloc] init];
[path setLineWidth:1.0];
// draw first set of points. green
for (i=0; i < npoints; ++i)
{
p = [self getAPoint:i];
[path lineToPoint:p];
}
[path closePath];
[[NSColor greenColor] set];
[path stroke];
// draw second set of points. red
for (i=0; i < npoints; ++i)
{
p = [self getBPoint:i];
[path lineToPoint:p];
}
[path closePath];
[[NSColor redColor] set];
[path stroke];
[path dealloc];
nothing displays... this is done in my drawrect function...
Have I misunderstood something?
What is the difference between this and say appendBezierPathWithPoints?
How do you add one point at a time with the append method?
It seems to want a pointer to a point array...
_______________________________________________
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