• 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: How to clear an NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to clear an NSImage


  • Subject: Re: How to clear an NSImage
  • From: Marco Binder <email@hidden>
  • Date: Sat, 12 Apr 2003 18:00:38 +0200

Since you seem to know, how to draw thing in your image as you say, why dont you then just draw a big rectangle of [NSColor clearColor]?!

[myImage lockFocus];
[[NSColor clearColor] set];
NSFillRect(NSMakeRect(0,0,[myImage size].width, [myImage size].height));
[myImage unlockFocus];

MArco


Am Samstag, 12.04.03 um 13:45 Uhr schrieb Arthur VIGAN:

Hi,

my question is quite simple: I have an NSImage instance with transparent background and things drawn on it, and I would like to clear what is drawn to have my NSImage empty, just with the transparent background. How can I do?

Thakns in advance,

-- Arthur
_______________________________________________
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.


--
|\ /| email@hidden http://www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
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: 
 >How to clear an NSImage (From: Arthur VIGAN <email@hidden>)

  • Prev by Date: Re: Look at NSData
  • Next by Date: Re: Look at NSData
  • Previous by thread: Re: How to clear an NSImage
  • Next by thread: Access NetCDF library
  • Index(es):
    • Date
    • Thread