Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
- Subject: Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?
- From: Peter N Lewis <email@hidden>
- Date: Wed, 28 Oct 2009 13:49:38 +0800
On 27/10/2009, at 13:26 , Dalmazio Brisinda wrote:
I'm working with a Snow Leopard 64-bit app that contains a Finder-
like file browser that uses Carbon IconRef's. I'm trying to get the
icons for the selected file with a custom overlay based on the
current file selection and Icon Services. The problem I'm having is
that the Icon Services CompositeIconRef() doesn't seem to work
correctly.
I just ran in to this same issue. I take it no one has a workaround
for this bug?
On 27/10/2009, at 13:32 , Kyle Sluder wrote:
Sounds like you should move all of your code to working with NSImage
rather than IconRefs. As soon as you get an icon, you should convert
it into an NSImage and work with it from then on.
In that case, how do you plot the image disabled? What's the NSImage
equivalent for kTransformDisabled?
An NSImage can be created from an icon using initWithIconRef, and an
icon can be plotted into a NSView with PlotIconRefInContext.
But it is presumably non-trivial to composite two NSImages created
from initWithIconRef, since you'd have to composite each different
solution. Or is there a method for compositing NSImages that handles
that case?
So in order to convert from using IconRef to using NSImage for
everything (after loading the IconRef), I need to know how to:
a) composite two images, preferably while keeping the different
resolutions of the icon
b) how to dim an image similarly to kTransformDisabled
Any suggestions?
Google didn't find much useful for either NSImage & compositing or
NSImage & kTransformDisabled.
Thanks,
Peter.
--
Clipboard Switching and Macros with Keyboard Maestro
Keyboard Maestro <http://www.keyboardmaestro.com/> Macros for your Mac
<http://www.stairways.com/> <http://download.stairways.com/>
_______________________________________________
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