• 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: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image


  • Subject: Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image
  • From: Ben Lachman <email@hidden>
  • Date: Thu, 20 Aug 2009 17:31:46 -0400


On Aug 19, 2009, at 11:49 PM, Adam R. Maxwell wrote:

On Aug 19, 2009, at 8:39 PM, Ben Lachman wrote:

On Aug 19, 2009, at 8:45 PM, Adam R. Maxwell wrote:

On Aug 19, 2009, at 2:50 PM, Ben Lachman wrote:

I have an offscreen window containing a WebView that I'm using to generate web previews. My current code works beautifully and looks like this:

NSView *view = previewWebView.mainFrame.frameView.documentView;

I do something similar, although using the frameView directly (and drawing to a CGContext). Do you really need to draw the documentView?

If I use the frameView I get scrollers in the generated image. How do you avoid getting scrollers?

WebFrameView *view = [[_webView mainFrame] frameView]; [view setAllowsScrolling:NO];

Incidentally, this is the call that broke things in Safari 4.0.3, so if you're not using it, you're likely running into something else :). This is easier than messing about with the documentView, though, in my opinion.


This works pretty well, although I do seem to get a white area where there would have been a scroller on the right hand side.


The problem still is that you can't really grab an arbitrary rect of the rendered canvas which was my hope when accessing the documentView directly.

->Ben
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

email: email@hidden
twitter: @benlachman
mobile: 740.590.0009



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >- [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image (From: Ben Lachman <email@hidden>)
 >Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image (From: "Adam R. Maxwell" <email@hidden>)
 >Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image (From: Ben Lachman <email@hidden>)
 >Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: How to disable the table view when search bar is active
  • Next by Date: Re: How to reference to objects laid in external xibs in Interface Builder?
  • Previous by thread: Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image
  • Next by thread: Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image
  • Index(es):
    • Date
    • Thread