• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder-like Color Labels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Finder-like Color Labels (From: Ricci Adams <email@hidden>)

  • Prev by Date: Problem creating PreferencePane Project in Xcode
  • Next by Date: Re: Help with NSMatrix (for displaying images from iPhoto)
  • Previous by thread: Finder-like Color Labels
  • Next by thread: Re: Finder-like Color Labels
  • Index(es):
    • Date
    • Thread