Thanks David,
I am not sure that this will work for me in this instance as the smaller image needs to be in a NSImageView so I can drag n'drop other images in there.

Regards
Damien

On 06/02/2009, at 9:22 AM, David Blanton wrote:

I do this to composite one image over another:

        CGContextRef ctx = UIGraphicsGetCurrentContext();
        CGContextClearRect(ctx, rect);  
        CGContextDrawImage(ctx, rect, _meterImages[0]);
        CGContextSetBlendMode (ctx, kCGBlendModeNormal);        
        CGContextDrawImage(ctx, rect, _meterImages[1]);

(iPhone example but the only difference I think is UIGraphicsGetCurrentContext)


On Feb 5, 2009, at 3:28 PM, Damien Cooke wrote:

Hi All,
I have what is probably a stupid problem. In my window I have a background NSImageView and I want to pop another much smaller one on top. The one I am putting on top is a png with transparencies. When I do this I get a rectangular image over my background but what I want to see is only the non transparent parts of my image. I have set the background colour of my image via [image setBackgroundColor:[NSColor clearColor]] but I am perplexed with the spectacular lack of any change.

I feel I am completely on the wrong path. Can someone point me in the right direction?

Regards
Damien


If you can't be kind, at least have the decency to be vague.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/airedale%40tularosa.net

This email sent to aired...@tularosa.net



David Blanton






If you can't be kind, at least have the decency to be vague.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to