• 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: Icon Badges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Icon Badges (From: email@hidden)

  • Prev by Date: Re: EOF (was [objC retain];
  • Next by Date: HELP!! on Opining file at startup and D-N-D (newbie type question)
  • Previous by thread: Re: Icon Badges
  • Next by thread: Re: Icon Badges
  • Index(es):
    • Date
    • Thread