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 05:06:23 +0100
Am 30.01.2004 um 03:31 schrieb Ricci Adams:
(Rounded rectangles that have a slight shadow and a gradient).
I just created an implementation of this, you can download it
at http://www.ricciadams.com/downloads/labeldemo.tar.gz
Nice!
Any reason you used Core Graphics drawing instead of NSBezierPath?
'Cause I needed the same form for those Safari like roll over buttons
and came up with this:
- (void)appendBezierPathWithPlateInRect:(NSRect)rect
{
if (rect.size.height > 0) {
float xoff = rect.origin.x;
float yoff = rect.origin.y;
float radius = rect.size.height/2.0;
NSPoint point4 = NSMakePoint(xoff+radius, yoff+rect.size.height);
NSPoint center1 = NSMakePoint(xoff+radius, yoff+radius);
NSPoint center2 = NSMakePoint(xoff+rect.size.width-radius,
yoff+radius);
[self moveToPoint:point4];
[self appendBezierPathWithArcWithCenter:center1 radius:radius
startAngle:90.0 endAngle:270.0];
[self appendBezierPathWithArcWithCenter:center2 radius:radius
startAngle:270.0 endAngle:90.0];
[self closePath];
}
}
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.