Re: Icon Badges
Re: Icon Badges
- Subject: Re: Icon Badges
- From: Charles Srstka <email@hidden>
- Date: Thu, 28 Mar 2002 12:10:00 -0600
Beautiful. This worked great. Thanks!
It actually wasn't the application's icon I was putting the badge on
(that was just an example), but it worked just the same. :-)
Thanks again,
Charles
On Thursday, March 28, 2002, at 12:59 AM, email@hidden wrote:
something like this: (assuming badge is the badge image and
badgeDestRect is where you want to put it)
id appIcon = [NSApp applicationIconImage];
[appIcon lockFocus];
[badge drawInRect:badgeDestRect fromRect:NSZeroRect
operation:NSCompositeSourceOver fraction:1.0];
[appIcon unlockFocus];
[NSApp setApplicationIconImage:appIcon];
you might have to mess with setFlipped on the badge to get it upside
right.
On Wednesday, March 27, 2002, at 07:42 PM, Charles Srstka wrote:
Anyone know of an easy way to put a badge on an NSImage, and put the
badged image as a new NSImage?
I know there has to be an easy way to do this since Mail.app's badges
its icon. But how do you do this?
TIA,
Charles
_______________________________________________
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.
_______________________________________________
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.