Re: Icon Badges
Re: Icon Badges
- Subject: Re: Icon Badges
- From: email@hidden
- Date: Wed, 27 Mar 2002 22:59:42 -0800
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.
References: | |
| >Icon Badges (From: Charles Srstka <email@hidden>) |