• 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: I need a milder application badge (solution)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need a milder application badge (solution)


  • Subject: Re: I need a milder application badge (solution)
  • From: Jay Reynolds Freeman <email@hidden>
  • Date: Sat, 25 Jul 2009 12:15:35 -0700

> You have two choices: change your application's icon using
> -[NSApplication setApplicationIconImage:], or customize the dock
> tile returned by -[NSApplication dockTile]. Neither of these
> changes will persist after your application quits.

I do not want to change the dockTile, and no public method of
NSDockTile appears to change the dock icon in any case.  I am
indeed using -[NSApplication setApplicationIconImage:], my
problem is creating a new image that has the correct areas
transparent.

  What is the Cocoa way to alter an NSImage
  dynamically (or perhaps alter a copy of
  an original image), at run-time, while
  preserving as transparent any transparent
  areas it may have to begin with?

> You've touched on a few separate topics here. Sounds like you might > want to read the Quartz documentation to get an idea of how graphics > composition works. And play around with Photoshop a bit; the Quartz > model is quite similar.

I am sure I can do it; it's all just ones and zeros and I have
access to all the bits.  But I am not a graphics specialist and I am
reluctant to become one.  (And I have never used Photoshop or
anything remotely like it.)  I am just looking for a
way to alter images dynamically, at run-time, that is as easy
as putting up an offscreen window/view hierarchy and drawing
into it.  I would like to be able to use something like the
capabilities of NSView for superimposing different things
on my new image.  I would like to work the problem at as
high a level as I can.

In a separate comment, Scott Ribe has pointed out that I can
draw to an image directly by instantiating it and locking focus.
He is right, I did not read Sherm's suggestion carefully.
However, I was doing my drawing in a view/window hierarchy in
order to make it easy to superimpose a badge-like string on
my image (I just put an NSText on top of the view that contains
the image and write the string with a background of
appropriate color.)

I need to thank you all for being patient with someone who is
unfamiliar with low-level Macintosh graphics; I need all the
help I can get.

--Kyle Sluder
--  Jay Reynolds Freeman
---------------------
email@hidden
http://web.mac.com/jay_reynolds_freeman (personal web site)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: I need a milder application badge (solution)
      • From: Kyle Sluder <email@hidden>
References: 
 >I need a milder application badge (From: Jay Reynolds Freeman <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Jay Reynolds Freeman <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Kyle Sluder <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Rob Keniger <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Jay Reynolds Freeman <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Kyle Sluder <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Jay Reynolds Freeman <email@hidden>)
 >Re: I need a milder application badge (solution) (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Unit testing question
  • Next by Date: Re: [iPhone] Why can't a UITextField be its own delegate?
  • Previous by thread: Re: I need a milder application badge (solution)
  • Next by thread: Re: I need a milder application badge (solution)
  • Index(es):
    • Date
    • Thread