• 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: 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.

  • Follow-Ups:
    • Re: Icon Badges
      • From: Charles Srstka <email@hidden>
References: 
 >Icon Badges (From: Charles Srstka <email@hidden>)

  • Prev by Date: Problems with NSString: initWithCString
  • Next by Date: Creating Directories Now Printing
  • Previous by thread: Icon Badges
  • Next by thread: Re: Icon Badges
  • Index(es):
    • Date
    • Thread