At 23:19 Uhr +0100 06.01.2005, Quentin Mathé wrote:
Le 4 janv. 05, à 21:49, M. Uli Kusterer a écrit :
I can fake transparency, because IconRefs contain alpha channels, and I could draw an IconRef into an NSImage, change its transparency and then generate a new IconRef from that, but I'd have to do the entire compositing using NSImages if I want to control the NSCompositingOperation.

ok, I understand the problem.

However, I think what we should do is just have OS X's IconKit implementation ignore the NSCompositingOperation for now. And maybe NSLog(@"Unsupported compositing operation in addIcon:") to the console if anything but "copy" is used. Then you can implement this feature, and I can later add compatibility code that manually composits stuff.

Then we need to be able to use the GNUstep related IconKit compositor in a Cocoa application, I don't think it is a problem because the IKCompositor could be compiled with Cocoa.

What would IKCompositor be used for? In most cases, icon badges will not do anything apart from being drawn opaque or slightly transparent on top of their icon. Users are able to do that using IKIcon. I don't think the users will care whether IKIcon uses IKCompositor or IconServices internally. Is this feature really needed?

The compositor could be very useful for various NSImage transformations, I wouldn't like to restrict it to icons related operations. Well, the right solution would be probably to create a powerful compositor outside of the IconKit, then the IconKit compositor could be derived from it or notŠ I don't knowŠ What do you think ?

Yeah, definitely a smart idea to have the compositor a generic object that works on any kind of NSImage. I don't even think you'd need a special subclass for IKIcons.

However, what kinds of transformations do you mean? I still think if there are many transformations, we'd want the compositor to be a parameter to addIcon:, so one can use different ones while creating an icon with various badges. Can you give a concrete example of how and what for a developer would use this compositor?
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
       "The Witnesses of TeachText are everywhere..."
                   http://www.zathras.de

Reply via email to