Re: Finder-like Color Labels
Re: Finder-like Color Labels
- Subject: Re: Finder-like Color Labels
- From: Andreas Mayer <email@hidden>
- Date: Fri, 30 Jan 2004 07:23:42 +0100
Am 30.01.2004 um 06:05 schrieb Ricci Adams:
I was unable to get the
gradient working. I tried drawing both paths (one for the label and
one
for the shadow) and then drawing on the gradient with
NSRectFillUsingOperation;
however, I couldn't get it to draw only within the bounds of the label.
Hm. You could probably draw the gradient into an NSImage and use that
image as fill color for a [path fill]:
NSBezierPath *path;
... build path ...
NSImage *gradient;
... fill image with gradient ...
[[NSColor colorWithPatternImage:gradient] set];
[path fill];
I guess I'm going to try that. :)
BTW: In 10.3 there's also an NSShadow class.
bye. Andreas.
_______________________________________________
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.