• 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: Making opaque images transparent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Making opaque images transparent (From: Keith Renz <email@hidden>)

  • Prev by Date: Re: How do I create a mutable version of my object?
  • Next by Date: Re: Autorelease pool questions
  • Previous by thread: Making opaque images transparent
  • Next by thread: Re: Making opaque images transparent
  • Index(es):
    • Date
    • Thread