• 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 Offscreen NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating an Offscreen NSView


  • Subject: Re: Creating an Offscreen NSView
  • From: Mark Morrill <email@hidden>
  • Date: Fri, 20 May 2005 19:23:57 -0600

10.3 and later

With 10.4, I know I can do the following

+ (NSGraphicsContext *)graphicsContextWithGraphicsPort:(void *)graphicsPort flipped:(BOOL)initialFlippedState;
where the graphicsPort is a CGBitmapContextRef


  + (void)setCurrentContext:(NSGraphicsContext *)context;

Even with that, I don't see how creating a NSView will set up an offscreen rendering space.

Mark

On 20-May-05, at 17:20, Shawn Erickson wrote:


On May 20, 2005, at 3:44 PM, Mark Morrill wrote:

What I want to be able to do is to render an html page into an offscreen context and then create an image from it.

The advice from the Quartz list was to render the page in a WebView, create PDF data from it, render that into a CGBitmapContextRef, then pull the CGImageRef from that.

The key is this has to be done offscreen.
I don't think you need to bother with the PDF data stream in the process above.

Which OS versions do you want to target?
10.2 and later?
10.3 and later?
10.4 and later?

-Shawn

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Creating an Offscreen NSView (From: Mark Morrill <email@hidden>)
 >Re: Creating an Offscreen NSView (From: Shawn Erickson <email@hidden>)
 >Re: Creating an Offscreen NSView (From: Mark Morrill <email@hidden>)
 >Re: Creating an Offscreen NSView (From: Shawn Erickson <email@hidden>)

  • Prev by Date: NSTextView Continuously Updates Value doesn't ...
  • Next by Date: Warnings on app termination from bindings to window controller?
  • Previous by thread: Re: Creating an Offscreen NSView
  • Next by thread: Re: Creating an Offscreen NSView
  • Index(es):
    • Date
    • Thread