Re: Making opaque images transparent
Re: Making opaque images transparent
- Subject: Re: Making opaque images transparent
- From: Andreas Mayer <email@hidden>
- Date: Mon, 20 Jan 2003 14:15:42 +0100
Am Montag, 20.01.03 um 06:50 Uhr schrieb Keith Renz:
Can anyone tell me how to make an opaque image transparent again?
- (void)clearImage:(NSImage *)image
{
[image lockFocus];
[[NSColor clearColor] set];
NSSize imageSize = [image size];
NSRectFillUsingOperation(NSMakeRect(0, 0, imageSize.width,
imageSize.height), NSCompositeCopy);
[image unlockFocus];
}
bye. Andreas.
_______________________________________________
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.