NSBezierPath question?
NSBezierPath question?
- Subject: NSBezierPath question?
- From: R T <email@hidden>
- Date: Tue, 17 May 2005 17:23:46 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
I'm trying to fill a pie wedge shape with gradated
colors.
This block of code...
[self lockFocus];
float st = 1, ct = 207, y = 200, num = 0, rr,
gg, bb;
NSBezierPath *bp = [NSBezierPath bezierPath];
blood = [[pCreats alloc] init];
do{
num = [blood sat:st];
rr = [blood yr11r:num]/255;
gg = [blood yr11g:num]/255;
bb = [blood yr11b:num]/255;
[[NSColor colorWithCalibratedRed:rr
green:gg blue:bb
alpha:1.0] set];
[bp
appendBezierPathWithArcWithCenter:(NSPoint){20,
285} radius:y startAngle:338.0 endAngle:342.0];
[bp closePath];
[bp fill];
y += 10; num++; st++; ct +=
16;
}while(ct<=256);
[blood release];
[self unlockFocus];
I've included a tiff of what I got and a drawing of
what I want......
The triangles seem to rotate and if I change the angle
the origin migrates........and a curve on the
perimeter would be perfect..
Thoughts?
Thanks
Rick T.
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news and more. Check it out!
http://discover.yahoo.com/mobile.html
_______________________________________________
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