• 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: creating an NSImage from an NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating an NSImage from an NSView


  • Subject: Re: creating an NSImage from an NSView
  • From: Philippe Mougin <email@hidden>
  • Date: Tue, 7 Jan 2003 16:13:09 +0100

> Hello,
>
> how can I make an NSImage from an NSView?
>
> thanks,
> Ben

A handy (but slow) way is:

NSImage *myImage = [[NSImage alloc] initWithData:[myView dataWithPDFInsideRect:[myView bounds]]];

where myView is your view :-)

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

  • Prev by Date: Re: Converting OSX Path to a OS9 Path
  • Next by Date: Re: Convert hexadecimal NSString (0xff00) to decimal integer?
  • Previous by thread: Re: Convert hexadecimal NSString (0xff00) to decimal integer?
  • Next by thread: [BUG] PDF generation incompatible with Acrobat
  • Index(es):
    • Date
    • Thread